FAQ Database Discussion Community


Error when using classify in caffe

python,python-2.7,caffe
I am using caffe in python to classify. I get code from here. In here, I just use simple code such as plt.rcParams['figure.figsize'] = (10, 10) plt.rcParams['image.interpolation'] = 'nearest' plt.rcParams['image.cmap'] = 'gray' mean_filename='./mean.binaryproto' proto_data = open(mean_filename, "rb").read() a = caffe.io.caffe_pb2.BlobProto.FromString(proto_data) mean = caffe.io.blobproto_to_array(a)[0] age_net_pretrained='./age_net.caffemodel' age_net_model_file='./deploy_age.prototxt' age_net = caffe.Classifier(age_net_model_file,...

How does Caffe determine the number of neurons in each layer?

neural-network,deep-learning,caffe
Recently, I've been trying to use Caffe for some of the deep learning work that I'm doing. Although writing the model in Caffe is very easy, I've not been able to know the answer to this question. How does Caffe determine the number of neurons in a hidden layer? I...

How to use 1-dim vector as input for caffe?

caffe
I'd like to train a neural network (NN) on my own 1-dim data, which I stored in a hdf5 database for caffe. According to the documetation this should work. It also works for me as far as I only use "Fully Connected Layers", "Relu" and "Dropout". However I get an...

Using GPU despite setting CPU_Only, yielding unexpected keyword argument

python,caffe
I'm installing Caffe on an Ubuntu 14.04 virtual server with CUDA installed (without driver) using https://github.com/BVLC/caffe/wiki/Ubuntu-14.04-VirtualBox-VM as inspiration. During the installation process I edited the MakeFile to include "CPU_ONLY := 1" before building it. However, it seems that Caffe is still trying to make use of the GPU. When I...

Error in creating LMDB database file in Python for Caffe

python,numpy,anaconda,caffe,lmdb
I'm trying to create an LMDB data base file in Python to be used with Caffe according to this tutorial. The commands import numpy as np and import caffe run perfectly fine. However, when I try to run import lmdb and import deepdish as dd, I'm getting the following errors:...

When does Caffe make copies of the data?

caffe
// Assuming that data are on the CPU initially, and we have a blob. const Dtype* foo; Dtype* bar; foo = blob.gpu_data(); // data copied cpu->gpu. foo = blob.cpu_data(); // no data copied since both have up-to-date contents. bar = blob.mutable_gpu_data(); // no data copied. // ... some operations...

Object categories of pretrained imagenet model in caffe

machine-learning,neural-network,deep-learning,caffe,matcaffe
I'm using the pretrained imagenet model provided along the caffe (CNN) library ('bvlc_reference_caffenet.caffemodel'). I can output a 1000 dim vector of object scores for any images using this model. However I don't know what the actual object categories are. Did someone find a file, where the corresponding object categories are...

How to adapt Caffe Matlab wrapper for a network trained on Mnist?

matlab,caffe,matcaffe
I successfully trained my Caffe net on the mnist database following http://caffe.berkeleyvision.org/gathered/examples/mnist.html Now I want to test the network with my own images using the Matlab wrapper. Therefore in "matcaffe.m" im loading the file "lenet.prototxt" which is not used for training but which seems to be suited for testing. It...

Two errors while running Caffe

python,deep-learning,caffe
I've installed Caffe on my Ubuntu 14.04 machine. the make runtest runs perfectly fine with 581 tests passed. I'm trying to work with the command line and python interface and getting the following two errors: Command Line Interface: When I try to run the command caffe, I'm getting the following...

Error while installing deepdish

python,pip,ubuntu-14.04,caffe,lmdb
I'm trying to create an LMDB database file to be used with Caffe according to this tutorial on an Ubuntu 14.04 machine using Anaconda Python 2.7.9. However, when I do pip install deepdish, I'm getting the following error: Collecting deepdish Using cached deepdish-0.1.4.tar.gz Complete output from command python setup.py egg_info:...

caffe Debug build: stray '"' character in nvcc command

compilation,cuda,nvcc,caffe
I am trying to build my C++ application that uses caffe, in Debug Mode, VS2013 community, x64. To be able to build version that do not need cuda to run, I added to wrapped each .cu file as indicated below: #ifndef CPU_ONLY // .cu file contents #endif The project was...

Drawing network in Caffe causes pydot to throw End of Line errors

python,ubuntu-12.04,pydot,caffe
So I just pulled the latest revision of Caffe from the master branch, and went through all the initialization steps. As a quick test, I was trying to run the python/draw_net.py script provided, in order to visualize the MNIST Autoencoder example network. On executing the following command: ./python/draw_net.py examples/mnist/mnist_autoencoder.prototxt trial_viz.png...

Caffe layer creation failure

c++,layer,deep-learning,caffe
I'm trying to load in TEST phase a network configuration which has a memory data layer first and then a convolution layer. The MemoryData layer creation succeeds, But the convolution layer's creation fails at the following location: LOG(INFO) << "Creating layer " << param.name(); const string& type = param.type(); CreatorRegistry&...

Import caffe error

python,caffe
i compiled caffe successfully in my ubuntu machine but cannot import in python. Caffe is installed /home/pbu/Desktop/caffe i tried adding the /home/pbu/caffe/python path to sys.path.append, still not working i am trying to import caffe [email protected]:/home/pbu/Desktop# python ./caffe/output.py Traceback (most recent call last): File "./caffe/output.py", line 13, in <module> import caffe...

caffe: libglog.so.0 missing (error while loading shared libraries)

caffe
I've installed caffe on a server a while ago, and back then it worked properly. Now I'm following the LeNet MNIST tutorial again (http://caffe.berkeleyvision.org/gathered/examples/mnist.html), and running ./examples/mnist/create_mnist.sh returns build/examples/mnist/convert_mnist_data.bin: error while loading shared libraries: libglog.so.0: cannot open shared object file: No such file or directory I've noticed that liibglog.so.0 is...

Python interface of Caffe: Error in “import caffe”

python,caffe
I'm trying to run Caffe in it's Python interface. I've already run the command make pycaffe in the caffe directory and it worked fine. Now, when I run the command import caffe in the python environment in the terminal (Ubuntu 14.04), I'm getting the following error: >>> import caffe Traceback...

How to get a layer from a caffe model using torch

python,lua,caffe,torch
In python when I want to get the data from a layer using caffe I have the following code input_image = caffe.io.load_image(imgName) input_oversampled = caffe.io.resize_image(input_image, self.net.crop_dims) prediction = self.net.predict([input_image]) caffe_input = np.asarray(self.net.preprocess('data', prediction)) self.net.forward(data=caffe_input) data = self.net.blobs['fc7'].data[4] // I want to get this value in lua Hoever when I'm using...

Armadillo in Caffe for pseudo-inverse and transpose

c++,armadillo,caffe
I need pseudo inverse and transpose function to implement a Layer in caffe. So I am using Armadillo library to do that. But How can I convert Caffe Blobs(2-D) to armadillo Mat and vice-versa ?

Installing Caffe (deep learning) issues

osx,caffe
I have been able to install Caffe but I had a lot of issues and that's because I didn't follow the instructions very well. I have a Mac OSx and I'm reading the OSx guide for installation. In this point: when I type hdf5 opencv I get: "hdf5: command not...

[Caffe]: Check failed: ShapeEquals(proto) shape mismatch (reshape not set)

python,c++,deep-learning,caffe
I have this error and I have tried to take a look in Internet but I got nothing clear. I trained my net with Caffe successfully with around 82% of accuracy. Now I'm trying to try it with an image through this code: python python/classify.py --model_def examples/imagenet/imagenet_deploy.prototxt --pretrained_model caffe_mycaffe_train_iter_10000.caffemodel --images_dim...

Cannot import caffe into python, libjpeg.so.62 not found

python,linux,anaconda,caffe
I cannot import caffe into (anaconda-) python. I'm following a notebook example on "logistic regression on non-image HDF5 data". When I execute the line import caffe I get the following error: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-17-3524921938b5> in <module>() 8 sys.path.insert(0, caffe_root + 'python') 9 ---> 10 import...

In CNN with caffe, Can I set up initial caffemodel?

gpu,restart,convolution,caffe
I have operated CNN using caffe. however, system was forced termination. I have caffemodel so far. Can I restart learning from now on using current caffemodel? Thanks,...