pytorch style init (LeCun uniform init)
import grain.testing; import grain.utility; import numir; import mir.ndslice; auto conv = Convolution!(float, 2, HostStorage)(3, 4, [3, 3]); auto x = uniform!float(2, 3, 4, 4).slice.variable(true); auto y = conv(x); auto gy = uniform!float(y.shape.castArray!size_t).slice.variable; gradCheckChain!conv(x, gy, 1e-3, 5e-2, 5e-2);
/// Parametric chains convolution operator