def forward(ctx, input, weights, bias, old_h, old_cell): outputs = lltm_cpp.forward(input, weights, bias, old_h, old_cell) new_h, new_cell = outputs[:2] variables = outputs[1:] + [weights] ctx.save_for_backward(*variables) return new_h, new_cell
def forward(ctx, inp): outputs = lltm_cpp.forward(inp.contiguous(), filename, function) ctx.save_for_backward(inp) return outputs[0]