Closed anshulpaigwar closed 6 years ago
I think there is an typing error in an example code in the tutorials Link on Pytorch website
import math import torch # Our module! import lltm class LLTMFunction(torch.nn.Function): # <-------------- Here @staticmethod def forward(ctx, input, weights, bias, old_h, old_cell): outputs = lltm.forward(input, weights, bias, old_h, old_cell) new_h, new_cell = outputs[:2] variables = outputs[1:] + [weights, old_cell] ctx.save_for_backward(*variables) return new_h, new_cell
torch.nn does not have module Function, It should be torch.autograd.Function
torch.nn
Function
torch.autograd.Function
True, thanks. Will fix
I think there is an typing error in an example code in the tutorials Link on Pytorch website
torch.nn
does not have moduleFunction
, It should betorch.autograd.Function