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

Method forward

intermediate_source/custom_function_conv_bn_tutorial.py:63–65  ·  view source on GitHub ↗
(ctx, X, weight)

Source from the content-addressed store, hash-verified

61class Conv2D(torch.autograd.Function):
62 @staticmethod
63 def forward(ctx, X, weight):
64 ctx.save_for_backward(X, weight)
65 return F.conv2d(X, weight)
66
67 # Use @once_differentiable by default unless we intend to double backward
68 @staticmethod

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected