nmheim / torsk

An echo state network (ESN) for video prediction
10 stars 5 forks source link

PyTorch 1.0: start using `torch.jit.script_method` on forward functions #12

Closed nmheim closed 5 years ago

nmheim commented 5 years ago

Tutorial that might be useful: here

Basically this has to be done:

To use script mode, be sure to inherit from the the torch.jit.ScriptModule base class (instead of torch.nn.Module) and add a torch.jit.script decorator to your Python function or a torch.jit.script_method decorator to your module’s methods.