The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

MNIST

MNIST

0
Votes
1
Answer

Hello,
In the MNIST example, I tried running [validation_targets] and I got the following: 

<tf.Tensor: id=57164, shape=(6000,), dtype=int64, numpy=array([6, 3, 9, ..., 2, 3, 3], dtype=int64)>

I thought the targets are a bunch of zeros and ones!
how can an output of [0,0.1,0.7,0,0,0,0,0,0,0.2] be compared to a target of [2] ?!
Shouldn't the target of [2] be in zeros,ones format ?

Thank you in advance Iliya.
Sorry for asking many questions

oh! I just got it! That’s why you applied sparse_categorical_crossentropy because you didn’t apply one-hot encoding to your targets. that’s perfect.

5 months
1 Answer

365 Team
0
Votes

Hi Hady,
Great to hear that you have managed to figure it out on your own!
It seems that the issue is solved and I will be closing the topic.
Best,
Iliya