User Tools

Site Tools


cs501r_f2016:lab3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
cs501r_f2016:lab3 [2016/09/09 17:10]
wingated
cs501r_f2016:lab3 [2016/09/09 17:11]
wingated
Line 57: Line 57:
 </​code>​ </​code>​
  
-Note a couple of things about this code: first, it is fully vectorized. ​ Second, the ''​numerical_gradient''​ function accepts a parameter called ''​loss_function''​ -- ''​numerical_gradient''​ is a higher-order function that accepts another function as an input. ​ This numerical gradient calculator could be used to calculate gradients for any function. ​+Note a couple of things about this code: first, it is fully vectorized. ​ Second, the ''​numerical_gradient''​ function accepts a parameter called ''​loss_function''​ -- ''​numerical_gradient''​ is a higher-order function that accepts another function as an input. ​ This numerical gradient calculator could be used to calculate gradients for any function. Third, you may wonder why my ''​loss_function''​ doesn'​t need the data!  Since the data never changes, I curried it into my loss function, resulting in a function that only takes one parameter -- the matrix ''​W''​.
  
 You should run your code for 1000 epochs. You should run your code for 1000 epochs.
cs501r_f2016/lab3.txt ยท Last modified: 2021/06/30 23:42 (external edit)