I
I
Ivasoft2016-02-06 16:21:35
Python
Ivasoft, 2016-02-06 16:21:35

An example of a neural network in Python?

1) Looking for a simple example for building a neural network. Eats two files - training and test.
2) Interested in what parameters to specify in learn_rates, learn_rate_decays, epochs, verbose

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Druzhaev, 2016-02-06
@borodaturan

I once got acquainted with the PyBrains library. It is quite easy to build a network in it.
However, this library is not the only option; there are also analogues.

T
tsarevfs, 2016-02-06
@tsarevfs

To begin with, it is useful to look at 2 graphs - the number of errors in the test and training samples by epochs.
learn_rates is a coefficient that corresponds to the learning rate. If the error decreases smoothly, but slowly, we increase it. also affects the probability of hitting a local minimum.
learn_rate_decays -- Decay learn_rates over time. The bottom line is that we are looking for an exact solution at a lower speed when we have already found a good approximation.
epochs -- actual runs of the training set. When the graphs remain in place for some time, there is no point in continuing training.
verbose -- not related to learning. If True prints some additional information in the process.
More graphs will help determine the complexity of the network (number of layers, neurons in them). If the accuracy on the training sample is much higher than on the test one, overfitting. This means that the model adapted too well to the training sample, “remembered” it, but does not work well on unfamiliar data. Reduce the complexity of the model. If the graphs are not very different, but the result is bad, you need to increase the complexity of the model.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question