def __init__(self, incoming, num_filters, filter_size, stride=(1, 1, 1), pad=0, untie_biases=False, W=init.GlorotUniform(), b=init.Constant(0.), nonlinearity=nonlinearities.rectify, flip_filters=True, convolution=T.nnet.conv3d, **kwargs): BaseConvLayer.__init__(self, incoming, num_filters, filter_size, stride, pad, untie_biases, W, b, nonlinearity, flip_filters, n=3, **kwargs) self.convolution = convolution
def test_convolve_not_implemented(self): from lasagne.layers.conv import BaseConvLayer layer = BaseConvLayer((10, 20, 30), 1, 3) with pytest.raises(NotImplementedError): layer.convolve(theano.tensor.tensor3())
def test_infer_dimensionality(self): from lasagne.layers.conv import BaseConvLayer shape = (10, 20, 30, 40, 50, 60) for n in range(1, 4): layer = BaseConvLayer(shape[:n + 2], 1, 3) assert layer.n == n