Answer the question
In order to leave comments, you need to log in
Recurrent Neural Networks in Python?
Hello.
There was such a question, it is necessary to classify texts using a neural network, I present the test in vector form using word2vec, I write a neural network using keras, there is a special LSTM class for a recursive network, but a two-dimensional array is input to it, and I have a text vector. How to solve this problem? How to create a neural network in python for text classification using Keras + word2Vec?
Answer the question
In order to leave comments, you need to log in
1. In machine learning, they usually train on minibatch - blocks of N examples, where N is usually no more than 100 - and not one at a time.
2. Therefore, the input is not a two-dimensional, but a three-dimensional array - <number of examples in a minibatch>*<maximum sequence length>*<number of features \ word vector dimension>
3. You can run text through word2vec as part of a neural network on Keras - there is an Embedding layer in which you can preset weight values. Then the input values are sequences of word id's.
4. There are also examples: https://github.com/keras-team/keras/blob/master/ex...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question