0

I am writing an encoder/decoder model very similar to https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html

The only difference is, here, the words are represented by some indices. I want to show them based on another metric, which are represented by flaot numbers.

The loss function nn.criterion = nn.NLLLoss(), seems to be working for times we are only workin with classes.

If my output array is not an array of integers, but an array of float numbers, what kind of loss function I can use? Considering all other parts are similar to the tutorial?

Thanks in advance.

Kadaj13
  • 1,423
  • 3
  • 17
  • 41
  • Do you made the whole problem into a regression problem. How are the floats values to be interpreted? – Nopileos Oct 01 '20 at 11:36
  • So actually, I want to train my neural network to predict word embeddings such as word2vec or GloVe. I think cosine distance or MSE distance should work. Is that right? – Kadaj13 Oct 05 '20 at 07:50

0 Answers0