-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Module' object is not callable #4
Comments
Hello @guoguoguilai. |
import mxnet as mx def L106_Net96_v2(mode="train"):
batch_size = 4 Thank you Thank you in advance! |
Same Error on this code too:
|
İf you build the lib from the setup.py importing like this "from gluon2pytorch.gluon2pytorch import gluon2pytorch" solves the issue |
I loaded the model from .json and .params,
sym, arg_params, aux_params = mx.model.load_checkpoint(prefix[3], epoch[3])
mod = mx.mod.Module(symbol=L106_Net96_v2("test"), context=mx.gpu(), data_names=['data'], label_names=['landmark_target'])
mod.bind(for_training=False, data_shapes=[('data', (batch_size[3], 3, 96, 96))])
mod.set_params(arg_params, aux_params)
When I call pytorch_model = gluon2pytorch(mod, [(batch_size[3], 3, 96, 96)], dst_dir=None, pytorch_module_name='Test')
Return: TypeError: 'Module' object is not callable
How can I solve this problem?How to convert module to be hybrid ?
The text was updated successfully, but these errors were encountered: