def test_sum_square():
B,C,H,W = 2,3,4,5
X = Variable(torch.cuda.DoubleTensor(B,C,H,W).uniform_(-0.5,0.5),
requires_grad=True)
input = (X,)
test = gradcheck(encoding.functions.sum_square, input, eps=1e-6, atol=1e-4)
print('Testing sum_square(): {}'.format(test))
评论列表
文章目录