MCPcopy Create free account
hub / github.com/pytorch/tutorials / forward

Method forward

advanced_source/numpy_extensions_tutorial.py:39–42  ·  view source on GitHub ↗
(ctx, input)

Source from the content-addressed store, hash-verified

37class BadFFTFunction(Function):
38 @staticmethod
39 def forward(ctx, input):
40 numpy_input = input.detach().numpy()
41 result = abs(rfft2(numpy_input))
42 return input.new(result)
43
44 @staticmethod
45 def backward(ctx, grad_output):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected