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 is a fast framework, developed by Berkeley AI Research (BAIR)/ The Berkeley Vision and Learning Center (BVLC). Its architecture is based on pure and and supports and processing without the need to adapt the code for one of the processing units. Caffe provides and interfaces. Caffe is released under the BSD 2-Clause license.

Caffe users share popular models for different tasks with all kinds of architectures and data in the Model Zoo. These models are learned and applied for problems ranging from simple regression, to large-scale visual classification, to Siamese networks for image similarity, to speech and robotics applications.

Useful Links:

2834 questions
17
votes
1 answer

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 side of the input. How to achieve that in…
karl_TUM
  • 5,769
  • 10
  • 24
  • 41
17
votes
2 answers

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: "scale2b_branch2b" type: "Scale" scale_param { …
Igor Ševo
  • 5,459
  • 3
  • 35
  • 80
17
votes
2 answers

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 = lmdb_env.begin() lmdb_cursor =…
ytrewq
  • 3,670
  • 9
  • 42
  • 71
17
votes
3 answers

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 set and validation set which has 100K and 50K…
DucCuong
  • 638
  • 1
  • 7
  • 26
16
votes
1 answer

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 config file: python caffe2darknet.py my_prototxt.txt…
mcExchange
  • 6,154
  • 12
  • 57
  • 103
16
votes
3 answers

Image augmentation makes performance worse

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 double the image size, but I found the performance…
user288609
  • 12,465
  • 26
  • 85
  • 127
16
votes
1 answer

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:…
Alex
  • 12,578
  • 15
  • 99
  • 195
16
votes
2 answers

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 install a new library each time you want to test…
David
  • 1,898
  • 2
  • 14
  • 32
16
votes
5 answers

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 insert 'nvidia_352': No such device F0910…
batuman
  • 7,066
  • 26
  • 107
  • 229
16
votes
3 answers

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 this layer, the class probabilities, be the…
Shai
  • 111,146
  • 38
  • 238
  • 371
15
votes
2 answers

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 tensorflow/keras. Initially, I used a…
Thornhale
  • 2,118
  • 1
  • 23
  • 40
15
votes
2 answers

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" layer is followed immediately with "Scale" layer:…
Shai
  • 111,146
  • 38
  • 238
  • 371
15
votes
1 answer

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. The training log then looks something like: I1109…
Shai
  • 111,146
  • 38
  • 238
  • 371
15
votes
2 answers

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 increasing and reached above 80% but validation accuracy…
sau
  • 1,316
  • 4
  • 16
  • 37
15
votes
2 answers

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 steps should I follow?