-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always encounter ImportError #1
Comments
You might want to show me exactly what the error is like, but I'm guessing that if the statement importing DeCAF returns an error, it's because it's not fully installed. Also, DeCAF should not be used anymore and I suggest you try Caffe (or any similar libraries like Lasagne or Keras). |
here is the same error I got when I execute python emotionclassification.py We STRONGLY recommend you to try to install mpi and mpi4py. WARNING:root:mpi4py exception message is: No module named mpi4py In addition, how long does it train in order to get you stating accuracy? Thank you |
The error says that it needs the DecafNet files, which are the weight matrices used to initialize the network. To my knowledge, they are not available from the original researcher anymore and that is one reason why using Caffe is great: they have a model zoo that includes many pre-trained models (that you can then fine-tune or use as feature extractors). The code is very similar between DeCAF and Caffe. Training a linear classifier on top of the the convolutional layers is very quick (a few minutes). |
What code should I change if I move to Caffe, I am running a single node. Don't I need to train the weight of CNN only the classifier? |
I don't have the exact lines, but you can look at my other repo to get an idea of Caffe code, it's easy to figure out and useful if you want to get into machine learning. Fine-tuning can involve training the convolutional layers as well, it's just much slower (and your learning rate generally must be quite slow too), but it's better if you have a large amount of data and this is not the case for facial expressions (the largest datasets I've seen are AFEW/SFEW, SFEW has 700 images). |
Hmm.. I still don't quite get it. Do you mean you have not train your weight in this case or you are using the weight of existing model? Anyway I will figure out the Caffe |
For this project, I did not train any weights, I used them from an existing model (the DeCAF reference model, similar to the AlexNet). I used the first to the sixth layer as a deep feature extractor, producing features usable for any other classifier. |
Oic, that will be much convenient. I am not sure if caffe has the same model for me to use directly. But anyway, you help is deeply appreciated and very helpful! |
Hi dear, when I try to use your code running python zengame.py always encounters ImportERROR that lacking of DecafDet but I did install Decaf correctly, could you please look at that?
Thanks!
The text was updated successfully, but these errors were encountered: