192e33a99505947aedd3dd8b081d71b04f14eb85,examples/equivariance_error/main.py,,,#,34

Before Change




y = y.data.cpu().numpy()
y1 = y1.data.cpu().numpy()
y2 = y2.data.cpu().numpy()

relative_error = np.std(y1 - y2) / np.std(y)

print("relative error = {}".format(relative_error))

After Change


    return torch.cat([x[:, :, :, n:], x[:, :, :, :n]], dim=3)

// Create random input
x = torch.autograd.Variable(torch.randn(1, 12, 128, 128), volatile=True).cuda() // [batch, feature, beta, alpha]

y = phi(x)
y1 = rot(phi(x), angle=45)
y2 = phi(rot(x, angle=45))

relative_error = torch.std(y1.data - y2.data) / torch.std(y.data)

print("relative error = {}".format(relative_error))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: jonas-koehler/s2cnn
Commit Name: 192e33a99505947aedd3dd8b081d71b04f14eb85
Time: 2017-10-30
Author: geiger.mario@gmail.com
File Name: examples/equivariance_error/main.py
Class Name:
Method Name:


Project Name: leftthomas/SRGAN
Commit Name: fea94d9805d3be49f5ae55d0ab3f35f07a5c6d12
Time: 2017-11-21
Author: leftthomas@qq.com
File Name: train.py
Class Name:
Method Name:


Project Name: leftthomas/SRGAN
Commit Name: fea94d9805d3be49f5ae55d0ab3f35f07a5c6d12
Time: 2017-11-21
Author: leftthomas@qq.com
File Name: test.py
Class Name:
Method Name: