convnet wrapper: check that `groups` matches `pattern` if both are given
corrected ImageActs gradient for grouped convolution