tscohen / GrouPy

Group Equivariant Convolutional Neural Networks
http://ta.co.nl
Other
349 stars 85 forks source link

Add PyTorch implementation for P4 and P4M GConv #5

Open jornpeters opened 7 years ago

jornpeters commented 7 years ago

This adds P4-conv and P4M-conv classes for PyTorch.

The implementation is based on the Chainer implementation (SplitGConv2D base class), the main difference being that the filter transforms are implemented using torch.gather instead of a custom function/kernel.

Equivariance tests (mimicking those for the Chainer implementation) are included. Moreover, the rotated MNIST experiment in [1] was reproduced to validate the implementation (the experiment file is not included in this pull request).

[1] T.S. Cohen, M. Welling, Group Equivariant Convolutional Networks. Proceedings of the International Conference on Machine Learning (ICML), 2016.