How to store data about neural network data?

I am new to this area, so the question may seem strange. However, before asking, I read a bunch of introductory articles about what is the key to machine learning and what are the actual parts of neural networks. Including it is very useful that one What is machine learning . Basically, as I understand it, an educated NN (correct me if it is wrong):

  • a set of connections between neurons (possibly self-supporting, may have gates, etc.).
  • generated activation probabilities for each compound.

Both things are adjusted during training to match the expected result as close as possible. Then, what do we do with educated NN - we load a test subset of the data into it and check how good it is. But what happens if we are satisfied with the test results, and we want to save the training results, and then not start training again when the data set receives new values.

So my question is, is that knowledge in the field of education stored somewhere other than RAM? can be reset (think about serializing objects in some way) so that you do not need to train your NN with the data that you receive tomorrow or later.

Now I am trying to do a simple demonstration with my dataset using synaptic.js , but I could not define such a concept for saving education on the project wiki. This library is just an example, if you are referring to some python library, it would be nice!

+5
source share
2 answers

In my answer, I will assume that you are working with a simple multilayer perceptron (MLP) , although my answer applies to other networks.

The goal of MLP β€œtraining” is to find the right strengths and strengths that minimize the error on the network output.

When a neuron is connected to another neuron, it is injected with weight. A neuron performs a function, such as the weighted sum of all inputs, and then outputs the result.

Once you have trained your network and found these weights, you can check the results with a validation kit .

If you are happy that your network works well, you simply record the weights that you apply to each connection. You can store these weights wherever you want (along with a description of the network structure) and then retrieve them later. There is no need to retrain the network every time you want to use it.

Hope this helps.

+4
source

Regarding saving it through synaptic.js:

This is pretty easy to do! There is actually a built-in function for this. There are two ways to do this.

If you want to use the network again without training

This will create a standalone function of your network, you can use it anywhere with javascript without requiring synaptic.js! Wiki

var standalone = myNetwork.standalone(); 

If you want to change the network later

Just convert your network to JSON. It can be downloaded anytime again using synaptic.js! Wiki

 // Export the network to a JSON which you can save as plain text var exported = myNetwork.toJSON(); // Conver the network back to useable network var imported = Network.fromJSON(exported); 
+5
source

Source: https://habr.com/ru/post/1243800/


All Articles