Reputation: 5451
I am doing exercise of DNN chapter from "Hands on machine learning using scikit and tensorflow" book. Below are the steps I am taking
Steps
Here is the link of google colab where I implemented it. It is not making any progress when training. But the solution provided by book is working, here is the google colab link. My implementation and the books implementation is slightly different but they are similar with same steps. I have spent two days trying to figure out what is different but I am not able to find it.
May be I have done a silly mistake, It would be great help to me if someone can point me what it is. I am new to tensorflow, someone with experience in it may easily see it.
My implementation in google colab
Books solution in google colab
Upvotes: 0
Views: 89
Reputation:
It doesn't look like you normalized your data anywhere. The book solution does this right at the beginning:
X_train = X_train.astype(np.float32).reshape(-1, 28*28) / 255.0
X_test = X_test.astype(np.float32).reshape(-1, 28*28) / 255.0
Upvotes: 1