MCPcopy Create free account
hub / github.com/ChenhongyiYang/QueryDet-PyTorch / run_function

Function run_function

utils/gradient_checkpoint.py:212–217  ·  view source on GitHub ↗
(start, end, functions)

Source from the content-addressed store, hash-verified

210 raise ValueError("Unexpected keyword arguments: " + ",".join(arg for arg in kwargs))
211
212 def run_function(start, end, functions):
213 def forward(input):
214 for j in range(start, end + 1):
215 input = functions[j](input)
216 return input
217 return forward
218
219 if isinstance(functions, torch.nn.Sequential):
220 functions = list(functions.children())

Callers 2

forwardMethod · 0.85
checkpoint_sequentialFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected