Skip to content

Instantly share code, notes, and snippets.

@thierryherrmann
Last active August 2, 2020 23:49
Show Gist options
  • Save thierryherrmann/e7fb589b07fb24ed1c56f219cdba38e4 to your computer and use it in GitHub Desktop.
Save thierryherrmann/e7fb589b07fb24ed1c56f219cdba38e4 to your computer and use it in GitHub Desktop.
print('type of reloaded module:', type(new_module))
print('type of instantiated module:', type(CustomModule()))
print('my_train function:', new_module.my_train)
print('__call__ function:', new_module.__call__)
# demo a call to the module. (calls the __call__() method)
print('sample prediction: ', new_module(X_train[0:1]).numpy())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment