MCPcopy Index your code
hub / github.com/pytorch/tutorials / ScipyConv2d

Class ScipyConv2d

advanced_source/numpy_extensions_tutorial.py:110–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108
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)
118
119
120###############################################################

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected