#๐Ÿ”’ NN prediction problem even good performance on training and testing

9 messages ยท Page 1 of 1 (latest)

frozen herald
#

code:
https://paste.pythondiscord.com/B4AA

so, i had trained a neural network quite sometime ago on mnist digits 0-9 and that model was doing fine i can't remember the exact accuracy but it was i think above 0.96
now i am using that same model incorporated with pygame to get the digit in real-time preprocess it and let the model do its thing the problem i seem to have is that the model isnt working predicting properly its stuck and always gives 3,5 as predictions mostly 3 and i don't know as when i jad trained it was good on test set as well but now its just ain't doing its thing . the reasons for which i think this might be happening is the preprocessing which i think is my weak
and thats why i think i need help i thought i could do this one go but like always. any help is much appreciated
Thank you all who helps

wheat jackalBOT
#

@frozen herald

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

frozen herald
#

really , no help?

tawdry holly
# frozen herald really , no help?

A) ML is hard. Not many people understand it (properly).
B) Your code doesn't show anything of your model. All there is, is a model = load_model('/storage/emulated/0/saved_model/Digit_mnist NN/') and then a guess = np.argmax(model.predict(image)).
That's all we get. For what it's worth you could've just put the path to a totally different/worse/untrained model in the load_model funciton

frozen herald
#

well i didnt put the path to a untrained model it is a trained model should i share the model.summary?

#

Model: "sequential"


Layer (type) Output Shape Param #

conv2d (Conv2D) (None, 26, 26, 32) 320

flatten (Flatten) (None, 21632) 0

dense (Dense) (None, 64) 1384512

dense_1 (Dense) (None, 10) 650

=================================================================
Total params: 1385482 (5.29 MB)
Trainable params: 1385482 (5.29 MB)
Non-trainable params: 0 (0.00 Byte)


None

[Program finished]

frozen herald
wheat jackalBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.