Answer the question
In order to leave comments, you need to log in
Matrix. How to correctly submit data for neural network training?
There is data for training the neural network. For a person, these are sets of line graphs of 4 pieces. Those. In Excel, this data can be drawn as a 100x4 matrix. How to properly submit this data for neural network training? Are there any ways to submit data in the form of a matrix, or can you simply combine them into a 400x1 vector and the network itself will figure out what's what?
Answer the question
In order to leave comments, you need to log in
For keras, when training LSTM, RNN or convolutional networks, such data must be supplied in the form of a tensor, i.e. make the matrix three-dimensional or larger. Any two-dimensional matrix M(X, Y) can be represented as a three-dimensional matrix M(X, Y, Z), where Z=1.
This is done using reshape - the array dimension changes when the data is saved.
M =np.reshape(M, (X, Y, Z)) or M =np.reshape(M, (X, Z, Y)
) M(X, 400), and then after loading the data we do M =np.reshape(M, (X, 4, 100)).
The result is X sets of two-dimensional 4x100 matrices.
In principle, to load into python, you can save all the data in one line to a file, and then use reshape to cut them into the desired format (2d, 3d, 4d, etc.).
Depends on what your object is. Judging by your description, each line is 4 different parameters of one object. And by no means can they be shoved into one vector.
And in what form to submit, this is a very vague concept. First, define a neural network. With the help of which libraries you will work with it, and from there the form for submitting information will come up by itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question