Element-Research / rnn

Recurrent Neural Network library for Torch7's nn
BSD 3-Clause "New" or "Revised" License
939 stars 313 forks source link

Problem at inference with Sequencer #416

Closed fmagera closed 2 years ago

fmagera commented 7 years ago

I am training a RNN with a Sequencer but at test time i would like to send my data sequentially, so i remove the Sequencer layer and forward each sample individually in a loop. The problem is, the results are different when i send the same tensor to the network wrapped in the Sequencer or not. Both network are in evaluation mode and the data is totally equal. Can someone explain that behaviour ?

Thanks !

tastyminerals commented 7 years ago

What is the principal difference between recurrent and non-recurrent neural networks?

Training and testing should be done on the same network architecture. It is not surprising that you have different outputs.