Comments (5)
nolearn uses whatever Lasagne layers you throw at it. I have trained with layers using the pad
parameter, so I believe that it should work. If you encounter an error when using these parameters, post the exact code here and we may help. Remember that those are Lasagne parameters, not nolearn parameters.
from nolearn.
In effect 'pad is working just not documented in nolearn not so important.
It is the 'flip_filters' that is not working. hereafter the portion of the code where I define the layer.
`cnn = NeuralNet(
layers=[
('input', layers.InputLayer),
('conv1', layers.Conv2DLayer), #Convolutional layer. Params defined below
('pool1', layers.MaxPool2DLayer), # Like downsampling, for execution speed
('conv2', layers.Conv2DLayer),
('pool2', layers.MaxPool2DLayer),
('conv3', layers.Conv2DLayer),
('dropout1', layers.DropoutLayer),
('dense', layers.DenseLayer),
('dropout2', layers.DropoutLayer),
#('dense2', layers.DenseLayer),
#('dropout3', layers.DropoutLayer),
('output', layers.DenseLayer),
],
input_shape=(None, 1, 28, 28),
conv1_num_filters=96,
conv1_pad=1,
conv1_flip_filters=False,
conv1_filter_size=(3, 3),
conv1_nonlinearity=lasagne.nonlinearities.rectify,
conv1_W=lasagne.init.GlorotUniform(),`
The received error message is:
TypeError: Failed to instantiate <class 'lasagne.layers.conv.Conv2DLayer'> with args {'W': <lasagne.init.GlorotUniform object at 0x7f57d78cd890>, 'flip_filters': False, 'pad': 1, 'name': 'conv1', 'nonlinearity': <function rectify at 0x7f57dc0d29b0>, 'filter_size': (3, 3), 'incoming': <lasagne.layers.input.InputLayer object at 0x7f57d78cda50>, 'num_filters': 96}. Maybe parameter names have changed?
everything is working just commenting the line #conv1_flip_filters=False,
from nolearn.
This looks more like the Lasagne version installed with nolearn not supporting that parameter. Is it possible to instantiate a conv layer with that parameter at all?
layer = layers.ConvLayer(..., conv1_flip_filters=False)
If not, maybe installing the latest Lasagne version will help.
In general, the nolearn documentation will not repeat all the parameters from Lasagne. That does not mean that nolearn does not support them.
from nolearn.
I have
nolearn 0.6.1
Theano 0.8.2
Lasagne 0.1 but in my version the file into the package folder lasagne/layers/conv.py has not into the class BaseConvLayer the 'flip_filter'. It is mentioned into lasagne folder available in github website.
I should immagine that I do not have the last version but if I try the command
'Sudo apt-get update lasagne' the response is that I just have the last release.
I should imagine that my version is corrupted so I try to delete using the command
'sudo apt-get --purge remove Lasagne' but the response is that lasagne is not found
No other idea to fix this issue
from nolearn.
I solved, the reason was exactly the old lasagne version. Using:
pip install --upgrade https://github.com/Theano/Theano/archive/master.zip
pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip
I installed lasagne 0.2dev2 with also Theano 0.9dev4 and now it is working
1 billion of thanks
BR
Alberto
from nolearn.
Related Issues (20)
- RememberBestWeights does not honor the verbose parameter HOT 2
- A replayable fit() method - diff/patch attached HOT 1
- remove('trainable') Lasagne's command doesn't work in nolearn HOT 6
- OSError: could not read bytes when trying to fetch mldata HOT 2
- CUDA error, possibly related to network size? HOT 2
- Trained on GPU, inference on CPU doesn't make sense
- Install nolearn with Lasagne dependance not working HOT 2
- Bug in calculating average scores
- nolearn is not installing
- Bug when using Lasagne `mask_input` parameter
- 'NeuralNet' object has no attribute 'layers_' HOT 1
- Weights sum up to zero
- Future issue with sklearn.cross_validation
- Dependency on both backends in requirements.txt switches off GPU support HOT 3
- Enable to reproduce the last value of trainning when predicting CNN
- enable to reproduce loss value of training when predicting CNN HOT 1
- python 3 support not working with Lasagne? HOT 12
- TypeError: Failed to instantiate <class 'lasagne.layers.pool.MaxPool2DLayer'> with args {'name': 'pool1', 'ds': (2, 2), 'incoming': <lasagne.layers.conv.Conv2DLayer object at 0x7ff765fa29e8>}. Maybe parameter names have changed?
- nolearn now on conda-forge HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nolearn.