Alexander
Alexander

Reputation: 33

How is a neural network tested after it's trained and saved to a file?

I've trained a deep belief neural network (formed by stacked restricted boltzmann machines) using some pseudo-code from the internet. The problem is after training it, i.e. after adjusting its weights, I have no clear idea how to test it.

I have an input image and a trained neural network. How must the classification be done? I've saved the trained network to a file. The problem is I haven't thoroughly studied the math behind it as I need this project done ASAP. Also, Googling didn't provide any clear information.

Upvotes: 1

Views: 1290

Answers (2)

Throwback1986
Throwback1986

Reputation: 6005

One common approach is to train your NN on two-thirds of your available training data. The remaining third is then used to test the trained network. The ratio of training/testing data can be changed to meet your application, but it is critical that the training and test groups be free of bias. You might consider randomly partitioning your data into the two sets to ensure you don't inadvertently introduce bias.

Upvotes: 0

B. D
B. D

Reputation: 7798

I've trained a deep belief neural network (formed by stacked restricted boltzmann machines) using some pseudo-code from net.

This means that you've "fed" your neural networks with pairs consisting of an image and a value associated with it, right? This value might be 0/1 in case of classification or any real number in the case of regression.

Testing it means that you've got to "feed" your neural network only with the image. In your pseudo-code, there's supposed to be two functions : void train(Image input, float trainValue) and another one float predict(Image input). (Change Image with whatever is relevant in your case : vector, Matrix, etc...)

Can you give us your code (or at least pseudo code)?

Upvotes: 2

Related Questions