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

Method __init__

advanced_source/numpy_extensions_tutorial.py:111–114  ·  view source on GitHub ↗
(self, filter_width, filter_height)

Source from the content-addressed store, hash-verified

109
110class ScipyConv2d(Module):
111 def __init__(self, filter_width, filter_height):
112 super(ScipyConv2d, self).__init__()
113 self.filter = Parameter(torch.randn(filter_width, filter_height))
114 self.bias = Parameter(torch.randn(1, 1))
115
116 def forward(self, input):
117 return ScipyConv2dFunction.apply(input, self.filter, self.bias)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected