jcatw / scnn

Implementation of search-convolutional neural networks (SCNNs)
MIT License
51 stars 9 forks source link

Error in import SCNN #1

Closed sxs4337 closed 8 years ago

sxs4337 commented 8 years ago

Thanks for the great code. I am trying to run the example and getting the following error while importing SCNN.

from scnn import SCNN, data Traceback (most recent call last): File "", line 1, in File "scnn.py", line 69, in class SCNN: File "scnn.py", line 85, in SCNN loss_fn=lasagne.objectives.multiclass_hinge_loss, AttributeError: 'module' object has no attribute 'multiclass_hinge_loss'

Thank you.

jcatw commented 8 years ago

Thanks for letting me know. This is most likely due to multiclass_hinge_loss not being included in lasagne 0.1. Could you run the following and paste the output?

import lasange print lasagne.__version__

If that output is not 0.2dev, and you are willing to upgrade, you can upgrade lasagne by running the following:

pip install -r https://raw.githubusercontent.com/Lasagne/Lasagne/master/requirements.txt pip install https://github.com/Lasagne/Lasagne/archive/master.zip

That should solve the issue.

jcatw commented 8 years ago

I've updated scnn to 1.1.1, which now depends on lasagne 0.1dev (which seems to be the latest thing on pypi).

sxs4337 commented 8 years ago

I had lasagne 0.1 which was causing the error. I upgraded to lasagne 0.2dev and was able to run the example. Thanks.