Dev Khadka
Dev Khadka

Reputation: 5451

My DNN model to compare MNIST dataset using tensorflow not making progress

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

Answers (1)

user10532452
user10532452

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

Related Questions