Train Neural Network With Embedded Encoding Using Pytorch