A General Framework for Robust G-Invariance in G-Equivariant Networks