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.add(Dense(50, input_dim=300, activation='relu')) model.add(Dense(400, activation='relu')) model.add(Dense(400, activation='relu')) model.add(Dense(2, activation='softmax')) model.compile(optimizer='sgd', loss='mse', metrics=["accuracy"])
What should I do to make my classification work?