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

Method forward

dcgan/main.py:194–200  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

192 )
193
194 def forward(self, input):
195 if (input.is_cuda or input.is_xpu) and self.ngpu > 1:
196 output = nn.parallel.data_parallel(self.main, input, range(self.ngpu))
197 else:
198 output = self.main(input)
199
200 return output.view(-1, 1).squeeze(1)
201
202
203netD = Discriminator(ngpu).to(device)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected