hughperkins / pytorch

Python wrappers for torch and lua
BSD 2-Clause "Simplified" License
431 stars 70 forks source link

unknown Torch class <nn.gModule> #24

Open TheTesla opened 8 years ago

TheTesla commented 8 years ago

steps to reproduce: import PyTorchAug x = PyTorchAug.load('umich-stacked-hourglass.t7') output: ~/.luarocks/share/lua/5.1/torch/File.lua:343: unknown Torch class <nn.gModule>

but there is a ~/.luarocks/share/lua/5.1/nngraph/gmodule.lua also there is a ~/.luarocks/share/lua/5.1/nn directory - maybe something incompatible/confusing/wrong require? How to solve the problem?

TheTesla commented 8 years ago

I found the misstake, I have to: import PyTorch PyTorch.require('nngraph') explicitely