MCPcopy Create free account
hub / github.com/Sin3DM/Sin3DM / forward

Method forward

src/diffusion/nn.py:144–150  ·  view source on GitHub ↗
(ctx, run_function, length, *args)

Source from the content-addressed store, hash-verified

142class CheckpointFunction(th.autograd.Function):
143 @staticmethod
144 def forward(ctx, run_function, length, *args):
145 ctx.run_function = run_function
146 ctx.input_tensors = list(args[:length])
147 ctx.input_params = list(args[length:])
148 with th.no_grad():
149 output_tensors = ctx.run_function(*ctx.input_tensors)
150 return output_tensors
151
152 @staticmethod
153 def backward(ctx, *output_grads):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected