Implements ConvLayer etc.