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

Method __init__

advanced_source/neural_style_tutorial.py:239–241  ·  view source on GitHub ↗
(self, target_feature)

Source from the content-addressed store, hash-verified

237class StyleLoss(nn.Module):
238
239 def __init__(self, target_feature):
240 super(StyleLoss, self).__init__()
241 self.target = gram_matrix(target_feature).detach()
242
243 def forward(self, input):
244 G = gram_matrix(input)

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 1

gram_matrixFunction · 0.85

Tested by

no test coverage detected