Skip to content

Instantly share code, notes, and snippets.

@jamesr66a
Created June 21, 2018 22:10
Show Gist options
  • Save jamesr66a/51ef0c3a684bc617ee044b67668fb98e to your computer and use it in GitHub Desktop.
Save jamesr66a/51ef0c3a684bc617ee044b67668fb98e to your computer and use it in GitHub Desktop.
import torch
class TracedForward(torch.jit.ScriptModule):
@torch.jit.trace(torch.rand(5)):
def forward(self, x):
return torch.neg(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment