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

Before Change


y = foo(x)

// L_R \Phi(x)
y1 = so3_rotation(y, alpha, beta, gamma)

// \Phi(L_R x)
y2 = foo(so3_rotation(x, alpha, beta, gamma))


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

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

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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: osmr/imgclsmob
Commit Name: ff46766065ea7846f8b36701451afc2bf6d667d3
Time: 2019-06-08
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/efficientnet.py
Class Name:
Method Name: _test


Project Name: kymatio/kymatio
Commit Name: 4f91cb1bfab978c05a30de8a70e36426aaa19df5
Time: 2018-11-21
Author: janden@flatironinstitute.org
File Name: examples/3d/compute_speed.py
Class Name:
Method Name: