Questions tagged [caffe]
Caffe is a fast deep learning framework. It supports CPU and GPU processing. Caffe is released under the BSD 2-Clause license. It is based on C++ but provides APIs for Python and Matlab.
caffe
2,832
questions
260
votes
15
answers
713k
views
How to verify CuDNN installation?
I have searched many places but ALL I get is HOW to install it, not how to verify that it is installed. I can verify my NVIDIA driver is installed, and that CUDA is installed, but I don't know how to ...
128
votes
7
answers
81k
views
Common causes of nans during training of neural networks
I've noticed that a frequent occurrence during training is NANs being introduced.
Often times it seems to be introduced by weights in inner-product/fully-connected or convolution layers blowing up.
...
68
votes
4
answers
131k
views
NameError: name 'get_ipython' is not defined
I am working on Caffe framework and using PyCaffe interface. I am using a Python script obtained from converting the IPython Notebook 00-classification.ipynb for testing the classification by a ...
45
votes
2
answers
27k
views
Cheat sheet for caffe / pycaffe?
Does anyone know whether there is a cheat sheet for all important pycaffe commands?
I was so far using caffe only via Matlab interface and terminal + bash scripts.
I wanted to shift towards using ...
45
votes
1
answer
19k
views
Faster RCNN for TensorFlow
Has anyone implement the FRCNN for TensorFlow version?
I found some related repos as following:
Implement roi pool layer
Implement fast RCNN based on py-faster-rcnn repo
but for 1: assume the roi ...
44
votes
4
answers
43k
views
What is the definition of a non-trainable parameter?
What is the definition of non-trainable parameter in a model?
For example, while you are building your own model, its value is 0 as a default, but when you want to use an inception model, it is ...
37
votes
2
answers
34k
views
What is `lr_policy` in Caffe?
I just try to find out how I can use Caffe. To do so, I just took a look at the different .prototxt files in the examples folder. There is one option I don't understand:
# The learning rate policy
...
37
votes
2
answers
7k
views
Finding gradient of a Caffe conv-filter with regards to input
I need to find the gradient with regards to the input layer for a single convolutional filter in a convolutional neural network (CNN) as a way to visualize the filters.
Given a trained network in the ...
35
votes
1
answer
27k
views
A guide to convert_imageset.cpp
I am relatively new to machine learning/python/ubuntu.
I have a set of images in .jpg format where half contain a feature I want caffe to learn and half don't. I'm having trouble in finding a way to ...
34
votes
2
answers
10k
views
Tackling Class Imbalance: scaling contribution to loss and sgd
(An update to this question has been added.)
I am a graduate student at the university of Ghent, Belgium; my research is about emotion recognition with deep convolutional neural networks. I'm using ...
33
votes
5
answers
77k
views
Is it good learning rate for Adam method?
I am training my method. I got the result as below. Is it a good learning rate? If not, is it high or low?
This is my result
lr_policy: "step"
gamma: 0.1
stepsize: 10000
power: 0.75
# lr for ...
31
votes
5
answers
38k
views
Caffe didn't see hdf5.h when compiling
I am having trouble when installing Caffe Deep Learning Framework on Python:
When I run make command at caffe directory, it says
hdf5.h:no such directory
The steps I have done:
Update and ...
31
votes
5
answers
118k
views
How to change CUDA version
I met this error when compiling a modified caffe version.
OpenCV static library was compiled with CUDA 7.5 support. Please, use the same version or rebuild OpenCV with CUDA 8.0
I have some old code ...
30
votes
4
answers
4k
views
Python real time image classification problems with Neural Networks
I'm attempting use caffe and python to do real-time image classification. I'm using OpenCV to stream from my webcam in one process, and in a separate process, using caffe to perform image ...
30
votes
1
answer
868
views
Why do some object detection neural networks return all zeros in OpenCV 4.1.0?
I have a problem with evaluating several neural networks in OpenCV 4.1.0 from Java/Scala. Networks return all zeros for fish-bike image as well as others. I observe this in:
COCO SSD512* https://...
28
votes
3
answers
17k
views
Convert Tensorflow model to Caffe model
I would like to be able to convert a Tensorflow model to Caffe model.
I searched on google but I was able to find only converters from caffe to tensorflow but not the opposite.
Does anyone have an ...
26
votes
2
answers
38k
views
What is `weight_decay` meta parameter in Caffe?
Looking at an example 'solver.prototxt', posted on BVLC/caffe git, there is a training meta parameter
weight_decay: 0.04
What does this meta parameter mean? And what value should I assign to it?
26
votes
2
answers
68k
views
What is the proper way to weight decay for Adam Optimizer
Since Adam Optimizer keeps an pair of running averages like mean/variance for the gradients, I wonder how it should properly handle weight decay. I have seen two ways of implementing it.
Only update ...
25
votes
2
answers
17k
views
Setting GLOG_minloglevel=1 to prevent output in shell from Caffe
I'm using Caffe, which is printing a lot of output to the shell when loading the neural net.
I'd like to suppress that output, which supposedly can be done by setting GLOG_minloglevel=1 when running ...
24
votes
2
answers
28k
views
how to calculate a net's FLOPs in CNN [closed]
I want to design a convolutional neural network which occupy GPU resource no more than Alexnet.I want to use FLOPs to measure it but I don't know how to calculate it.Is there any tools to do it,please?...
24
votes
1
answer
4k
views
Sharing contiguous numpy arrays between processes in python
While I have found numerous answers to questions similar to mine, I don't believe it has been directly addressed here--and I have several additional questions. The motivation for sharing contiguous ...
23
votes
1
answer
3k
views
When to use in-place layers in Caffe?
By setting the bottom and the top blob to be the same we can tell Caffe to do "in-place" computation to preserve memory consumption.
Currently I know I can safely use in-place "BatchNorm", "Scale" ...
22
votes
1
answer
13k
views
How to design deep convolutional neural networks? [closed]
As I understand it, all CNNs are quite similar. They all have a convolutional layers followed by pooling and relu layers. Some have specialised layers like FlowNet and Segnet. My doubt is how should ...
21
votes
5
answers
65k
views
Importing caffe results in ImportError: "No module named google.protobuf.internal" (import enum_type_wrapper)
I installed Anaconda Python on my machine. When I start the Python Interpreter and type "import caffe" in the Python shell, I get the following error:
ImportError: No module named google.protobuf....
21
votes
3
answers
8k
views
What is a `"Python"` layer in caffe?
Caffe has a layer type "Python".
For instance, this layer type can be used as a loss layer.
On other occasions it is used as an input layer.
What is this layer type?
How can this layer be used?
21
votes
4
answers
16k
views
What does global pooling do?
I recently found the "global_pooling" flag in the Pooling layer in caffe, however was unable to find sth about it in the documentation here (Layer Catalogue)
nor here (Pooling doxygen doc) .
Is ...
20
votes
3
answers
16k
views
caffe with multi-label images
I have a dataset of images that have multiple labels; There are 100 classes in the dataset, and each image has 1 to 5 labels associated with them.
I'm following the instruction in the following URL:
...
19
votes
2
answers
38k
views
Could not find PROTOBUF Compiler
I'm trying to do a CMake with Caffe, but my system cannot find protobuf compiler. I have previously installed protobuf2.7.0. Now I switched back to 2.6.1. How could I configure my CMake to recognize ...
18
votes
2
answers
10k
views
Building custom Caffe layer in python
After parsing many links regarding building Caffe layers in Python i still have difficulties in understanding few concepts. Can please someone clarify them?
Blobs and weights python structure for ...
18
votes
1
answer
2k
views
How to build Caffe framework XCode 6.2, iOS 8.3 environment
I am working on build caffe framework for ios, i used the Caffe master source and make files to build the framework for iOS.
I changed the OS target in CMake GUI config as "/Applications/Xcode.app/...
17
votes
2
answers
23k
views
Caffe: Reading LMDB from Python
I've extracted features using caffe, which generates a .mdb file.
Then I'm trying to read it using Python and display it as a readable number.
import lmdb
lmdb_env = lmdb.open('caffefeat')
lmdb_txn =...
17
votes
1
answer
15k
views
Custom padding for convolutions in TensorFlow
In tensorflow function tf.nn.conv2d, the padding option just has 'SAME' and 'VALID'.
But in the conv layer of Caffe, there is pad option can define the number of pixels to (implicitly) add to each ...
17
votes
2
answers
20k
views
Scale layer in Caffe
I am looking through the Caffe prototxt for deep residual networks and have noticed the appearance of a "Scale" layer.
layer {
bottom: "res2b_branch2b"
top: "res2b_branch2b"
name: "...
17
votes
3
answers
11k
views
Monitor training/validation process in Caffe
I'm training Caffe Reference Model for classifying images.
My work requires me to monitor the training process by drawing graph of accuracy of the model after every 1000 iterations on entire training ...
16
votes
2
answers
7k
views
Is there a common format for neural networks
Different teams use different libraries to train and run neural networks (caffe, torch, theano...). This makes sharing difficult: each library has its own format to store networks and you have to ...
16
votes
3
answers
11k
views
Image augmentation makes performance worse [closed]
I am working on an image segmentation project, and have been trying to adopt the image augmentation technique to increase the training set size. At first, I just try to use the horizontal flip to ...
16
votes
5
answers
37k
views
Import caffe error
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 ...
16
votes
3
answers
7k
views
InfogainLoss layer
I wish to use a loss layer of type InfogainLoss in my model. But I am having difficulties defining it properly.
Is there any tutorial/example on the usage of INFOGAIN_LOSS layer?
Should the input to ...
16
votes
5
answers
25k
views
Could not insert 'nvidia_352': No such device
I am trying to run caffe on Linux Ubuntu.
After installation, I run caffe in gpu and the error is
I0910 13:28:13.606891 10629 caffe.cpp:296] Use GPU with device ID 0
modprobe: ERROR: could not ...
16
votes
1
answer
6k
views
How to convert caffe prototxt to pytorch model?
So far I was using the pytorch-caffe-darknet-convert repository. After overcoming numerous problems (concat and eltwise layers not convertible) I ended up with something that looks like a darknet ...
16
votes
1
answer
6k
views
What is the simplest way to make object detector on C++ with Fast/Faster-RCNN?
What is the simplest way to make object detector on C++ with Fast/Faster-RCNN and Caffe?
As known, we can use follow RCNN (Region-based Convolutional Neural Networks) with Caffe:
RCNN: https://...
15
votes
2
answers
43k
views
How to increase validation accuracy with deep neural net?
I am trying to build a 11 class image classifier with 13000 training images and 3000 validation images. I am using deep neural network which is being trained using mxnet. Training accuracy is ...
15
votes
2
answers
11k
views
Fine Tuning of GoogLeNet Model
I trained GoogLeNet model from scratch. But it didn't give me the promising results.
As an alternative, I would like to do fine tuning of GoogLeNet model on my dataset. Does anyone know what are the ...
15
votes
2
answers
12k
views
LSTM module for Caffe
Does anyone know if there exists a nice LSTM module for Caffe? I found one from a github account by russel91 but apparantly the webpage containing examples and explanations disappeared (Formerly http:/...
15
votes
2
answers
8k
views
How can I speed up deep learning on a non-NVIDIA setup?
Since I only have an AMD A10-7850 APU, and do not have the funds to spend on a $800-$1200 NVIDIA graphics card, I am trying to make due with the resources I have in order to speed up deep learning via ...
15
votes
2
answers
3k
views
Caffe: What can I do if only a small batch fits into memory?
I am trying to train a very large model. Therefore, I can only fit a very small batch size into GPU memory. Working with small batch sizes results with very noisy gradient estimations.
What can I do ...
15
votes
1
answer
3k
views
How to interpret caffe log with debug_info?
When facing difficulties during training (nans, loss does not converge, etc.) it is sometimes useful to look at more verbose training log by setting debug_info: true in the 'solver.prototxt' file.
...
15
votes
2
answers
8k
views
Caffe Multiple Input Images
I'm looking at implementing a Caffe CNN which accepts two input images and a label (later perhaps other data) and was wondering if anyone was aware of the correct syntax in the prototxt file for doing ...
15
votes
2
answers
13k
views
How should "BatchNorm" layer be used in caffe?
I am a little confused about how should I use/insert "BatchNorm" layer in my models.
I see several different approaches, for instance:
ResNets: "BatchNorm"+"Scale" (no parameter sharing)
"BatchNorm" ...
15
votes
2
answers
5k
views
Multiple category classification in Caffe
I thought we might be able to compile a Caffeinated description of some methods of performing multiple category classification.
By multi category classification I mean: The input data containing ...