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

Method forward

advanced_source/neural_style_tutorial.py:243–246  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

241 self.target = gram_matrix(target_feature).detach()
242
243 def forward(self, input):
244 G = gram_matrix(input)
245 self.loss = F.mse_loss(G, self.target)
246 return input
247
248
249######################################################################

Callers

nothing calls this directly

Calls 1

gram_matrixFunction · 0.85

Tested by

no test coverage detected