pytorch - x, norm (), torch. autograd. grad 함수

x.norm()  :
http://www.pythonheidong.com/blog/article/170104/

torch.autograd.grad :
, shape shape
outputs:

inputs: grad_outputs: , 1
1 disc_interpolates = netD(interpolates)
2 gradients = torch.autograd.grad(outputs=disc_interpolates, inputs=interpolates,
3                           grad_outputs=torch.ones(disc_interpolates.size()).to(device),
4                           create_graph=True, retain_graph=True, only_inputs=True)[0]

좋은 웹페이지 즐겨찾기