lua---nnx
lua---nnx copied to clipboard
PullTable:cuda() yields infinite recursion
Paired PullTable and PushTable instances each have pointers to each other. This means that when we call pullTable:cuda(), it calls :cuda() on the corresponding PushTable, which calls, :cuda() on the PullTable, etc. This leads to infinite recursion!
The problem occurs for any type casting of the module, eg. PullTable:float()
This wasn't an issue until recently when the implementation of nn.Module:type() was changed. I'm not sure if the fix is to change the PullTable/PushTable implementations or to change the Module:type() implementation.
this is a fun problem to have. We'll see how to fix this...!