# Classification of lists of word2vec vectors doesn't work

I have 2 lists of word2vec vectors. First list has vectors, which represent fruits names, second list has vectors which represent vegetables names.

I am trying to train neural network on this 2 lists. Output for fruits is [1, 0] and output for vegetables is [0, 1]

Finally, when network will be trained, I want to feed word2vec vector of word "fruits" and receive output [1, 0]. And for "vegetables" I want receive output [0, 1].

But I have trouble: when network is training, accuracy index "freeze" at value 0.5

I use pre-trained "lexvec.enwiki+newscrawl.300d.W.pos.vectors" word2vec model with gensim, keras with Dense layers.

Here is NN model:

model = Sequential()
model.compile(optimizer='sgd', loss='mse', metrics=["accuracy"])


What should I do to make my classification work?

The first thing to consider is the size of your training data. From your description and results I gather that it is small. There are three things your need to:

1. Change your loss to categorical crossentropy and use a single output since you have boolean classes.

2. Significantly decrease the size of your network. First try a single hidden layer with far fewer hidden units.

3. Split your data into training, validation, and test sets. If your dataset is small, use cross-fold validation.

I would recommend starting with this code (logistic regression):

model = Sequential()


If that fails, add a hidden layer:

model = Sequential()
H = 100