MCPcopy Create free account
hub / github.com/Vchitect/SEINE / forward

Method forward

models/utils.py:44–51  ·  view source on GitHub ↗
(ctx, run_function, length, *args)

Source from the content-addressed store, hash-verified

42class CheckpointFunction(torch.autograd.Function):
43 @staticmethod
44 def forward(ctx, run_function, length, *args):
45 ctx.run_function = run_function
46 ctx.input_tensors = list(args[:length])
47 ctx.input_params = list(args[length:])
48
49 with torch.no_grad():
50 output_tensors = ctx.run_function(*ctx.input_tensors)
51 return output_tensors
52
53 @staticmethod
54 def backward(ctx, *output_grads):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected