Cloud Based Training
  • Blog
    • Blog
    • Category List
    • Articles
    • AWS Services
    • Azure Cloud Computing
    • Google Cloud Services
  • Steam
    • Science
    • Technology
    • Engineering
    • Arts
    • Mathematics
  • eForum
  • moodlesite
  1. You are here:  
  2. Home
  3. Learn
  4. Blog
Amazing Andromeda Galaxy

Backpropagation with Sample Data

Sample Example: Backpropagation Example:

The following imports are require for running the script in Python

  • import numpy as np
  • import matplotlib.pyplot as plt

 

Step 1: Initialize Weights and Inputs

$$ w_{1} = 0.15, \quad w_{2} = 0.20, \quad w_{3} = 0.25, \quad w_{4} = 0.30 $$ $$ w_{5} = 0.40, \quad w_{6} = 0.45 $$ $$ x_{1} = 0.05, \quad x_{2} = 0.10 $$

Step 2: Forward Pass (Calculate Activation)

$$ h_{1} = \sigma(w_{1}x_{1} + w_{2}x_{2}) = \sigma(0.0175) $$ $$ h_{2} = \sigma(w_{3}x_{1} + w_{4}x_{2}) = \sigma(0.0275) $$ $$ y = \sigma(w_{5}h_{1} + w_{6}h_{2}) = \sigma(0.75) $$

Step 3: Calculate Loss (Mean Squared Error)

$$ L = \frac{1}{2} (0.85 - 0.75)^2 = 0.005 $$

Step 4: Backpropagate Error

$$ \delta_{\text{output}} = (t - y) \cdot \sigma'(z_{\text{output}}) $$ $$ \delta_{\text{output}} = (0.85 - 0.75) \cdot 0.18 = 0.018 $$

Step 5: Update Weights

$$ w_{5} = w_{5} + \eta \cdot \delta_{\text{output}} \cdot h_{1} $$ $$ w_{6} = w_{6} + \eta \cdot \delta_{\text{output}} \cdot h_{2} $$

-------- Note that there may be some HTML representation missing in the above formular ------

This link takes you to the conversation so you can make your voice heard on Cloud Base Training Forum.

Ai and ML are not new but they make an interesting concept in Technology. Login to run the script that generated the above graph

Goto to Forum.

Back Top

Subcategories

Steam

(Science, Technology, Engineering, Arts and Mathematics)

Page 2 of 2

  • 1
  • 2

CBT2CBT

  • Blog
  • Learn
    • Blog
    • Category List
    • Articles
    • AWS Services
    • Azure Cloud Computing
    • Google Cloud Services
  • Steam
    • Science
    • Technology
    • Engineering
    • Arts
    • Mathematics
  • eForum
  • moodlesite

Login Form

  • Forgot your password?
  • Forgot your username?

Main Menu

  • Home

Popular Tags

Cloud As Service 4 Google 4 Azure 4 AWS 4

Older Posts

  • Backpropagation with Sample Data
  • Methods of Delivering Services
  • Introduction to Gradient Descent
  • Career Pathway
  • Help
  • Login
  • Contact