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
28
votes
3 answers

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 idea on how to do it? Thanks, Evi
Evi
  • 401
  • 1
  • 5
  • 6
26
votes
2 answers

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 mean/variance from the gradients based on the…
Kato
  • 478
  • 1
  • 5
  • 8
26
votes
2 answers

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?
Shai
  • 111,146
  • 38
  • 238
  • 371
24
votes
2 answers

how to calculate a net's FLOPs in CNN

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?
StalkerMuse
  • 1,001
  • 3
  • 11
  • 22
24
votes
1 answer

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 numpy arrays is as follows: I'm using a…
eriophora
  • 999
  • 1
  • 8
  • 20
24
votes
2 answers

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 the Python script. I've tried doing that using the…
pir
  • 5,513
  • 12
  • 63
  • 101
23
votes
1 answer

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" and "ReLU" layers (please let me know if I'm wrong).…
22
votes
1 answer

How to design deep convolutional neural networks?

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 we decide how many layers to use and how do we set…
21
votes
3 answers

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?
Shai
  • 111,146
  • 38
  • 238
  • 371
21
votes
5 answers

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.internal I have the following…
PyNerd
  • 645
  • 2
  • 9
  • 19
20
votes
3 answers

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: https://github.com/BVLC/caffe/issues/550 It says…
ytrewq
  • 3,670
  • 9
  • 42
  • 71
19
votes
4 answers

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 there an easy forward examply explanation to this in…
18
votes
2 answers

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 the protobuf2.6.1 compiler? I have done $ sudo…
holopekochan
  • 595
  • 2
  • 10
  • 18
18
votes
2 answers

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 network is explained here: Finding gradient of a…
loknar
  • 539
  • 5
  • 12
18
votes
1 answer

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…
cloudVision
  • 279
  • 1
  • 12