Online Forum

What's next after training a network?  


New Member
Joined:3 months  ago
Posts: 1
24/03/2018 2:25 pm  


It's been about a year now since I began and so far I have quite understanding of how neural networks are made and function. So far I know how to feedforward, backpropagate, and train the network. Now it seems as I am stuck in the next process. That is, I want to learn how after I have trained a network I can predict the next output based in data that was already learned. Just wondering if anyone can guide me towards the right direction for this. I am familiar with Python and Java, not so much in C.
Mostly, I am looking to learn the next mathematical algorithm in predicting an output. Is statistics involved in this?

Please help.

I did not find the right solution from the internet.


Best Internet Marketing Examples


New Member
Joined:2 weeks  ago
Posts: 1
10/05/2018 7:09 pm  

Hi harryjenkins,

Firstly, you need to save the trained weights to a model file on your hard disk. By default, the weights are stored in memory during the training process, once you exit the training, the weights are gone. So you must explicitly call the "save model" API in your training program at a certain time point, e.g., for each epoch, for every 10 epochs, when the maximum accuracy is met, when the minimum loss is met, etc.

What deep learning framework are you using? If you are familiar with tensorflow, check this official document for saving models.

Save and Restore  |  TensorFlow


When you have the model file, you can proceed to write a prediction program. In the prediction program, you need [1] get the input data (e.g. an image file to classify); [2] pre-processing the input data (same as training: resizing, normalization, etc); [3] load the model file and restore the trained network; [4] feed the processed data into the network; [5] extract the prediction results from the output layer.


Here is a tutorial for recognizing handwriting digits using tensorflow and MNIST dataset.


And here is the prediction program in the tutorial. You can take a look at it and try to implement your own prediction program.


If you have any questions, please leave a reply.





Please Login or Register