Created
May 27, 2019 11:59
-
-
Save shubham0204/c107e78ebb21b87f56083ecdcbf21a47 to your computer and use it in GitHub Desktop.
This file contains 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
def mean_squared_error( Y , y_pred ): | |
return tf.reduce_mean( tf.square( y_pred - Y ) ) | |
def mean_squared_error_deriv( Y , y_pred ): | |
return tf.reshape( tf.reduce_mean( 2 * ( y_pred - Y ) ) , [ 1 , 1 ] ) | |
def h ( X , weights , bias ): | |
return tf.tensordot( X , weights , axes=1 ) + bias |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment