Created
          July 13, 2020 18:54 
        
      - 
      
 - 
        
Save dvgodoy/6ac4841970378da8d63fc6c7590be886 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Computes our model's predicted output - forward pass | |
| yhat = b + w * x_train | |
| # Computing the loss | |
| # We are using ALL data points, so this is BATCH gradient | |
| # descent. How wrong is our model? That's the error! | |
| error = (yhat - y_train) | |
| # It is a regression, so it computes mean squared error (MSE) | |
| loss = (error ** 2).mean() | |
| print(loss) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment