MCPcopy Index your code
hub / github.com/POSTECH-CVLab/PyTorch-StudioGAN / backward

Method backward

src/utils/losses.py:33–37  ·  view source on GitHub ↗
(ctx, *grads)

Source from the content-addressed store, hash-verified

31
32 @staticmethod
33 def backward(ctx, *grads):
34 input, = ctx.saved_tensors
35 grad_out = torch.zeros_like(input)
36 grad_out[:] = grads[dist.get_rank()]
37 return grad_out
38
39
40class CrossEntropyLoss(torch.nn.Module):

Calls

no outgoing calls

Tested by

no test coverage detected