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
13
votes
2 answers

How to train a caffe model?

Has anyone successfully trained a caffe model? I have a training ready image set that I would like to use to create a caffe model for use with Google's Deep Dream. The only resources I've been able to find on how to train a model are…
jmcclaire
  • 175
  • 3
  • 4
  • 16
12
votes
2 answers

How to use "top" and "bottom" parameters to build network architecture

In Caffe prototxt, every layer includes either "top" or "bottom" parameter to specify connections between layers. There are sometimes, however, cases when, for example, the "top" is the layer itself (why do we have to link it to itself?) or there…
cerebrou
  • 5,353
  • 15
  • 48
  • 80
12
votes
1 answer

Counting the number of multiply-add operations (MAC) in Caffe CNN's architecture

Lately I've been benchmarking some CNNs regarding time, # of multiply-add operations (MAC), # of parameters and model size. I have seen some similar SO questions (here and here) and in the latter, they suggest using Netscope CNN Analyzer. This tool…
rafaspadilha
  • 629
  • 6
  • 20
12
votes
3 answers

Ways to implement multi-GPU BN layers with synchronizing means and vars

I'd like to know the possible ways to implement batch normalization layers with synchronizing batch statistics when training with multi-GPU. Caffe Maybe there are some variants of caffe that could do, like link. But for BN layer, my understanding…
LI Xuhong
  • 2,339
  • 2
  • 17
  • 32
12
votes
1 answer

error: function "atomicAdd(double *, double)" has already been defined

I get this error while trying to compile the caffe derivative DeepLab_v2 on Ubuntu 14.04.5 with Cuda 8.0. Does anyone know how to solve this? DeepLab_v2 compiles fine on another computer that has Cuda 7.5, but since in my current computer I have a…
mcExchange
  • 6,154
  • 12
  • 57
  • 103
12
votes
1 answer

What's the triplet loss back propagation gradient formula?

I am trying to use caffe to implement triplet loss described in Schroff, Kalenichenko and Philbin "FaceNet: A Unified Embedding for Face Recognition and Clustering", 2015. I am new to this so how to calculate the gradient in back propagation?
12
votes
2 answers

Modifying the Caffe C++ prediction code for multiple inputs

I implemented a modified version of the Caffe C++ example and while it works really well, it's incredibly slow because it only accepts images one by one. Ideally I'd like to pass Caffe a vector of 200 images and return the best prediction for each…
Jack Simpson
  • 1,681
  • 3
  • 30
  • 54
12
votes
4 answers

Test labels for regression caffe, float not allowed?

I am doing regression using caffe, and my test.txt and train.txt files are like this: /home/foo/caffe/data/finetune/flickr/3860781056.jpg 2.0 /home/foo/caffe/data/finetune/flickr/4559004485.jpg 3.6 …
Deven
  • 617
  • 2
  • 6
  • 20
12
votes
3 answers

How to enable multithreading with Caffe?

I would like to compile / configure Caffe so that when I trained an artificial neural network with it, the training is multi-threaded (CPU only, no GPU). How to enable multithreading with Caffe? I use Caffe on Ubuntu 14.04 LTS x64.
Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501
12
votes
2 answers

Caffe: Understanding expected lmdb datastructure for blobs

I'm trying to understand how data is interpreted in Caffe. For that I've taken a look at the Minst Tutorial Looking at the input data definition: layers { name: "mnist" type: DATA data_param { source: "mnist_train_lmdb" backend: LMDB …
Sam7
  • 3,382
  • 2
  • 34
  • 57
11
votes
1 answer

What does mask r-cnn's AP, AP50, AP70 mean?

I'm novice on r-cnn. There are term AP, AP50, AP75 on mask r-cnn paper. 50, 75 is small postfix, but I can't make it small, sorry. Anyway the paper says it is averaged over IOU thresholds. For AP50, only candidates over 50% region comparing ground…
semenbari
  • 725
  • 1
  • 8
  • 22
11
votes
1 answer

How to debug underlying C++ library from Python interface?

I am using apollocaffe and Reinspect. Apollocaffe is in c++ library and Reinspect is in python. Reinspect called apis from apollocaffe. I like to debug those apis inside apollocaffe. From python code, I used python -m pdb train.py But I can't go…
batuman
  • 7,066
  • 26
  • 107
  • 229
11
votes
1 answer

PyInstaller "ValueError: too many values to unpack"

Pyinstaller version 3.2 OS: win10 My python script work well in Winpython Python Interpreters. But when I using Pyinstaller packages a python script include caffe module, I will face the problem: “You may load I/O plugins with the…
Chi-Fang Hsieh
  • 235
  • 1
  • 3
  • 13
11
votes
4 answers

Caffe | Check failed: error == cudaSuccess (2 vs. 0) out of memory

I am trying to train a network on Caffe. I have image size of 512x640. Batch size is 1. I'm trying to implement FCN-8s. I am currently running this on a Amazon EC2 instance (g2.2xlarge) with 4GB of GPU memory. But when I run the solver, it…
11
votes
1 answer

What is batch size in Caffe or convnets

I thought that batch size is only for performance. The bigger the batch, more images are computed at the same time to train my net. But I realized, if I change my batch size, my net accuracy gets better. So I did not understand what batch size is.…