hughperkins / pytorch

Python wrappers for torch and lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

import class from arbitrary torch package

gexarcha opened this issue · comments

Can I import an arbitrary lua package and use one of its classes in python?
I have been trying to load the file from the installation directory directly but it doesn't seem to load any of the methods of the class.

myclass =PyTorchHelpers.load_lua_class('/home/user/torch/install/share/lua/5.1/mypackage/init.lua','myclass')

Any help would be appreciated here.