You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chapter 12 GDM, the part I code myself, is different from the result in the book; I checked the code of Mr Tiep also encountered the same situation. Then I detect; specifically, it is the one that initially creates the y value: we use the np.random.random(1000) function, we will return an array with shape (1000,) if we do not notice y.reshape(-1, 1) to match matrix addition and subtraction operations, it will be confusing (because py is different in size, it will treat it as broadcasting). Yes, grad will return a vector, but it returns a matrix because of the confusion above. That leads to consequences; later on, the code does not run correctly.
Source code fix : https://bit.ly/3mFp8N1 or https://bit.ly/3iOXImD
The text was updated successfully, but these errors were encountered:
Chapter 12 GDM, the part I code myself, is different from the result in the book; I checked the code of Mr Tiep also encountered the same situation. Then I detect; specifically, it is the one that initially creates the y value: we use the np.random.random(1000) function, we will return an array with shape (1000,) if we do not notice y.reshape(-1, 1) to match matrix addition and subtraction operations, it will be confusing (because py is different in size, it will treat it as broadcasting). Yes, grad will return a vector, but it returns a matrix because of the confusion above. That leads to consequences; later on, the code does not run correctly.
Source code fix : https://bit.ly/3mFp8N1 or https://bit.ly/3iOXImD
The text was updated successfully, but these errors were encountered: