Element-Research / rnn

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

save Model problem #409

Closed xieshuqin closed 7 years ago

xieshuqin commented 7 years ago

Hi

I decorate a nngraph model with nn.Recursor to make it a nn.AbstractSequencer class. But when I try to save a train model, the following error raises: Unwritable object at <?>.<?>.modules.1.<?>.rnn.test.rnntest._tests.Sequencer.._index.rejectWhile..rejectWhile.ipairs

It's very weird because when I test the code on my laptop, it works. But when I run it on a server, it raise the above error when executing torch.save(). Note that I have another torch.save() in front of it, and that works just fine. So Is there any problem when decorating nngraph model with nn.Recursor ?

Thanks for your reply

jnhwkim commented 7 years ago

Have you tried to update related packages on the server?

xieshuqin commented 7 years ago

uhh. This is fixed by update torch. I only tried update rnn and dp packages but that didn't work