2
$\begingroup$

I'm new to machine learning, so i figured I should look into google's tensor flow guides and I know how to code in JS so that's why I'm using tensorflow.js, there's and example in the guide that trains itslef to recognize handwritten numbers from the MNIST handwriting dataset, I sort of understand what's going on in the code but since I'm very new to ML it's not a lot, I went through the code and saw that it didn't took image by image to train itself but it requests one sprite which contains all the images and then cuts it into what it needs, this makes sense from a performance point of view, but as this process is kind of abstract I don't understand what's really going on, I want to upload an image of my own and call the predictor of the model but I don't know how to do it, any help?

I was thinking that drawing in a canvas of 28x28 a number might be very interesting as well instead of uploading an image, but I need to know how to test the model once it's trained with my own data.

The tutorial: https://js.tensorflow.org/tutorials/mnist.html

$\endgroup$
1
$\begingroup$

To test the model, you have to achieve a Tensor with the same dimensions as the training data. This Tensor should be the same for the same image, no matter how many times you remake the Tensor with the same image. That being said, you can attempt to reverse-engineer how the Tensors are being made. Hint: The dimensions of the input tensor should be (28, 28, 1).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.