Beispiel #1
0
 def test_fail_on_mismatching_dimensionality(self):
     from lasagne.layers.pool import MaxPool1DLayer
     with pytest.raises(ValueError) as exc:
         MaxPool1DLayer((10, 20), 3, 2)
     assert "Expected 3 input dimensions" in exc.value.args[0]
     with pytest.raises(ValueError) as exc:
         MaxPool1DLayer((10, 20, 30, 40), 3, 2)
     assert "Expected 3 input dimensions" in exc.value.args[0]
Beispiel #2
0
 def layer(self, input_layer, pool_size, stride=None, pad=0):
     from lasagne.layers.pool import MaxPool1DLayer
     return MaxPool1DLayer(
         input_layer,
         pool_size=pool_size,
         stride=stride,
         ignore_border=False,
     )
Beispiel #3
0
 def layer(self, input_layer, ds, st=None, pad=0):
     from lasagne.layers.pool import MaxPool1DLayer
     return MaxPool1DLayer(
         input_layer,
         ds=ds,
         st=st,
         ignore_border=False,
     )
Beispiel #4
0
 def layer_ignoreborder(self, input_layer):
     from lasagne.layers.pool import MaxPool1DLayer
     return MaxPool1DLayer(input_layer, ds=2, ignore_border=True)
Beispiel #5
0
 def layer(self, input_layer):
     from lasagne.layers.pool import MaxPool1DLayer
     return MaxPool1DLayer(input_layer, ds=2)