Menu
  • HOME
  • TAGS

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

python,c++,deep-learning,caffe

Let me confirm whether the basic steps are correct. input_dim: 10 input_dim: 3 input_dim: 64 input_dim: 64 Have you tried changing the first parameter to 1 as you are only passing a single image. The above mentioned error occurs when the dimensions of the top or bottom blobs are not...

Undefined symbols for architecture x86_64: for caffe build

c++,osx,opencv,osx-yosemite,caffe

Solved! cv::imread(cv::String const&, int) is defined on libopencv_imgcodecs.dylib and Makefile is missing it. So, I added opencv_imgcodecs to Makefile. LIBRARIES += glog gflags protobuf leveldb snappy \ lmdb \ boost_system \ hdf5_hl hdf5 \ opencv_imgcodecs opencv_highgui opencv_imgproc opencv_core pthread ...

Armadillo in Caffe for pseudo-inverse and transpose

c++,armadillo,caffe

Although, I haven''t found a way of conversion between armadillo and caffe blobs. But I noticed that caffe uses MKL library for CPU computations, which has both of the required functions i.e. pseudo inverse and transpose. In case, caffe is not configured to use MKL, I can easily implement a...

Using GPU despite setting CPU_Only, yielding unexpected keyword argument

python,caffe

I'm gonna add a few words to Mailerdaimon's answer. I followed the installation guide (https://github.com/BVLC/caffe/wiki/Ubuntu-14.04-VirtualBox-VM) to setup Caffe in my vagrant virtual machine. FYI, virtual machines DO NOT support GPU accelerating. Back to the point, after I fix 'CPU / GPU switch in example scripts'(https://github.com/BVLC/caffe/pull/2058) and add '--print_results --labels_file' options(https://github.com/jetpacapp/caffe/blob/master/python/classify.py)...

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

matlab,caffe,matcaffe

Finally I found the full solution: This how to predict a digit of your own input image using the matcaffe.m (Matlab wrapper) for Caffe In "matcaffe.m": One has to reference the file "caffe-master/examples/mnist/lenet.prototxt" Adapt the file "lenet.prototxt" as pointed out by mprat: Change the entry input_dim to input_dim: 1 Use...

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

caffe

You seem to be outputting your data using the wrong shape. Caffe blobs have the dimensions (n_samples, n_channels, height, width) . Other than that your prototxt seems to be fine for doing predictions based on a 1D input....

Caffe convert_imageset with one classifier

neural-network,lmdb,caffe

Got an answer from Caffe-users Google Group - yes, creating a dummy feature is the right way for this. So it is: img1.jpg 0 img2.jpg 1 img3.jpg 1 ...

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

python,linux,anaconda,caffe

Ok I finally found the solution: I had to sudo apt-get install libjpeg62 After that a new error occurred while trying to import caffe, namely ImportError: /home/myName/libs/anaconda/bin/../lib/libm.so.6: version `GLIBC_2.15' not found (required by /usr/lib/x86_64-linux-gnu/libx264.so.142) That could be solved by removing some buggy anaconda libraries thus resorting to the system libraries,quote...

Euclidean Loss Layer in Caffe

c++,deep-learning,caffe

For loss layers, there is no next layer, and so the top diff blob is technically undefined and unused - but Caffe is using this preallocated space to store unrelated data: Caffe supports multiplying loss layers with a user-defined weight (loss_weight in the prototxt), this information (a single scalar floating...

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

gpu,restart,convolution,caffe

Caffe supports resuming as explained here: We all experience times when the power goes out [...] Since we are snapshotting intermediate results during training, we will be able to resume from snapshots. This is available via the --snapshot option of the main caffe command-line tool, e.g: ./build/tools/caffe train [...] --snapshot=caffenet_train_10000.solverstate...

How to get a layer from a caffe model using torch

python,lua,caffe,torch

First of all please note that torch-caffe-binding (i.e the tool you use with require 'caffe') is a direct wrapper around Caffe library thanks to LuaJIT FFI. This means that it allows you to conveniently do a forward or backward with a Torch tensor, but behind the scenes these operations are...

Two errors while running Caffe

python,deep-learning,caffe

Make sure that numpy is installed correctly and the path is mentioned to detect the newly installed library. The steps are provided in Caffe website itself. For the 'Caffe' command to work, you will have to step into the folder where the 'Caffe' executable is created and then try running...

When does Caffe make copies of the data?

caffe

.gpu_data and .cpu_data are used in cases were the data is used only as input and will not be modified by the algorithm. .mutable_* is used when the data itself gets updated while running the algorithm. Whenever a the data is called, it checks whether the previous statement was a...

Library for deep learning on Amazon EC2 with CPU and GPU support for convolutional neural network

amazon-web-services,amazon-ec2,theano,deep-learning,caffe

If you follow the instructions here https://github.com/deeplearningparis/dl-machine then you can set up an AMI image with Theano and Torch. There is also a PR on the config to have caffe by default as well (if you need it, just checkout the branch and run the install script as soon as...

Convolution issue in Caffe

machine-learning,deep-learning,caffe

the lines I0122 17:18:40.337906 5074 net.cpp:103] Top shape: 100 9216 1 1 (921600) I0122 17:18:40.337929 5074 net.cpp:103] Top shape: 100 30 1 1 (3000) suggest that your input data is not in the correct shape. For an input of 100 batchs of 96x96 grey-scale image the shape should be: 100...

Error while installing deepdish

python,pip,ubuntu-14.04,caffe,lmdb

Can't seem to figure out why the error occurred, but after struggling for a while, I did the following and it seemed to work: Download the zip file from Github. Unzip the file after navigating to the directory where you've downloaded the file using the command unzip deepdish-master.zip. Navigate to...

Where can I find the label map between trained model like googleNet's output to there real class label?

machine-learning,neural-network,deep-learning,caffe

If you got caffe from git you should fine in data/ilsvrc12 folder a shell script get_ilsvrc_aux.sh. This script should download several files used for ilsvrc (sub set of imagenet used for the large scale image recognition challenge) training. The most interesting file (for you) that will be downloaded is synset_words.txt,...

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

compilation,cuda,nvcc,caffe

Turns out it was a typo. In project properties->Debug->CUDA C/C++->Device, instead of compute_30,sm_30 I had `compute_30, sm_30` that is, with a space separator....

Import caffe error

python,caffe

This happens when you have not run make for the python files separately. Run make pycaffe soon after running make in the Caffe directory. You may have to set the path to the python library correctly in Makefile.config...

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

caffe

The easiest way to work around the lack of shared libraries in system directories is to use LD_LIBRARY_PATH with the directory where the shared library lives. Before running the the command that requires a library, run the following in the following the same shell. export LD_LIBRARY_PATH=~/local/lib You can also stick...

Object categories of pretrained imagenet model in caffe

machine-learning,neural-network,deep-learning,caffe,matcaffe

You should look for the file 'synset_words.txt' it has 1000 line each line provides a description of a different class. For more information on how to get this file (and some others you might need) you can read this. If you want all the labels to be ready-for-use in Matlab,...

Error in creating LMDB database file in Python for Caffe

python,numpy,anaconda,caffe,lmdb

Well, the sudo apt-get install liblmdv-dev might work with bash (in the terminal) but apparently it doesn't work with Anaconda Python. I figured Anaconda Python might require it's own module for lmdb and I followed this link. The Python installation for lmdb module can be performed by running the command...

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

python,ubuntu-12.04,pydot,caffe

I think the key is in the determine_node_label_by_layertype function. This is a block of code that should look something like this (or at least it does in my current version of the repository): def determine_node_label_by_layertype(layer, layertype, rankdir): """Define node label based on layer type """ if rankdir in ('TB', 'BT'):...

Error when using classify in caffe

python,python-2.7,caffe

Let go to line 253-254 in caffe/python/caffe/io.py Replace if ms != self.inputs[in_][1:]: raise ValueError('Mean shape incompatible with input shape.') By if ms != self.inputs[in_][1:]: print(self.inputs[in_]) in_shape = self.inputs[in_][1:] m_min, m_max = mean.min(), mean.max() normal_mean = (mean - m_min) / (m_max - m_min) mean = resize_image(normal_mean.transpose((1,2,0)),in_shape[1:]).transpose((2,0,1)) * (m_max - m_min) +...

Installing Caffe (deep learning) issues

osx,caffe

hdf5 is not a command or anything else. The documentation is just bad, it has to be: brew tap homebrew/science hdf5 opencv So, what I mean is, we have to install hdf5 and then link it to Caffe. But executing hdf5 is not what the guide meant....

Issues with compiling Caffe with cuDNN

cuda,caffe

A version of Caffe that works with cuDNNv2 is available from S. Layton's github page. His Caffe master branch works with cuDNNv2. You can download it from the github page. He made a pull request to the official Caffe github and the full discussion is available here if you want...

LMDB files and how they are used for caffe deep learning network

matlab,image-processing,computer-vision,deep-learning,caffe

There is no connection between LMDB files and MS Access files. As I see it you have two options: Use the "convert_imageset" tool - it is located in caffe under the tools folder to convert a list of image files and label to lmdb. Instead of "data layer" use "image...

Caffe layer creation failure

c++,layer,deep-learning,caffe

This error occurs when trying to link caffe statically to an executable. You need to pass extra linker flags to make sure that layer registration code gets included. If you are using cmake take a look at Targets.cmake: ########################################################################################### # Defines global Caffe_LINK flag, This flag is required to prevent...

Python interface of Caffe: Error in “import caffe”

python,caffe

You need to add Python Caffe to PYTHONPATH. In your case: export PYTHONPATH=$PYTHONPATH:/home/pras/caffe/python

.mat files as input for caffe deep learning network

matlab,deep-learning,caffe

Mat files version 7.3 are hdf5 files, just make sure to use this format when writing. (check documenting for save) Any hdf5 library which supports gzip compression can read mat files. ...

caffe.cpp RegisterBrewFunction

c++,caffe

Your #define defines a macro that can be used inside a function. When the code reaches this function then the macro argument will be registered. You have to call the function for brewing the coffee. The original #define defines a macro that shall be used at file scope. It creates...

ImportError cannot import name BytesIO when import caffe on ubuntu

python,python-2.7,ubuntu,scikit-image,caffe

You appear to have a package or module named io in your Python path that is masking the standard library package. It is imported instead but doesn't have a BytesIO object to import. Try running: python -c 'import io; print io.__file__' in the same location you are running the tutorial...

Caffe: Extremely high loss while learning simple linear functions

python,neural-network,deep-learning,caffe,lmdb

The loss generated is a lot in this case because Caffe only accepts data (i.e. datum.data) in the uint8 format and labels (datum.label) in int32 format. However, for the labels, numpy.int64 format also seems to be working. I think datum.data is accepted only in uint8 format because Caffe was primarily...

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

neural-network,deep-learning,caffe

Caffe doesn't determine the number of neurons--the user does. This is pulled straight from Caffe's website, here: http://caffe.berkeleyvision.org/tutorial/layers.html For example, this is a convolution layer of 96 nodes (or neurons): layer { name: "conv1" type: "Convolution" bottom: "data" top: "conv1" # learning rate and decay multipliers for the filters param...