Skip to content
/ caffe Public
forked from intel/caffe

This fork of BVLC/Caffe is dedicated to improving performance of this deep learning framework when running on CPU, in particular Intel® Xeon processors (HSW+) and Intel® Xeon Phi processors

License

Notifications You must be signed in to change notification settings

M4gn4tor/caffe

 
 

Repository files navigation

Caffe

Build Status License

Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by the Berkeley Vision and Learning Center (BVLC) and community contributors.

Check out the project site for all the details like

and step-by-step examples.

Join the chat at https://gitter.im/BVLC/caffe

Please join the caffe-users group or gitter chat to ask questions and talk about methods and models. Framework development discussions and thorough bug reports are collected on Issues.

Happy brewing!

Intel Caffe

This fork is dedicated to improving Caffe performance when running on CPU, in particular Intel® Xeon processors (HSW, BDW, Xeon Phi)

Building

Build procedure is the same as on bvlc-caffe-master branch. Both Make and CMake can be used. When OpenMP is available will be used automatically.

Running

Run procedure is the same as on bvlc-caffe-master branch.

Current implementation uses OpenMP threads. By default the number of OpenMP threads is set to the number of CPU cores. Each one thread is bound to a single core to achieve best performance results. It is however possible to use own configuration by providing right one through OpenMP environmental variables like OMP_NUM_THREADS or GOMP_CPU_AFFINITY.

If some system tool like numactl is used to control CPU affinity, by default caffe will prevent to use more than one thread per core. When less than required cores are specified, caffe will limit execution of OpenMP threads to specified cores only.

Best performance solution

Please read release notes for our recommendations and configuration to achieve best performance on Intel CPUs.

Multinode Training

Intel Caffe multinode allows you to execute deep neural network training on multiple machines.

You should read our Wiki to understand how it works. For quick start read Multinode quickstart guide, next Multinode How to ...?

Please see also prepared examples for cifar10 and Googlenet.

For cifar10 example look at examples/cifar10/train_full_multinode_mpi.sh file. The script runs 4 processes on localhost. Prepared proto solvers should result in exactly the same behavior as single node full cifar training. It uses the MPI setup with an implicit parameter server (all-reduce approach). Each process is calculating its own gradients and sending them up through the binary tree structure. The intermediate nodes accumulate the received gradients with their own. The root node applies the weight updates and propagates them down the tree.

A copy of the data has to be accessible from all of the nodes. Datasets can be either distributed to each node or on a parallel file system. The snapshots are saved only by the root process. The same applies to the test phase - it is carried out by the root process.

For Googlenet example look at models/bvlc_googlenet/solver_client.prototxt. The solver tries to offset the bigger batch size with bigger learning rate. According to paper:

@article{
  Author = {Forrest N. Iandola, Khalid Ashraf, Matthew W. Moskewicz, Kurt Keutzer},
  Journal = {arXiv preprint arXiv:1511.00175},
  Title = {FireCaffe: near-linear acceleration of deep neural network training on compute clusters},
  Year = {2016}
}

this should use 72 epochs to train Googlenet.

License and Citation

Caffe is released under the BSD 2-Clause license. The BVLC reference models are released for unrestricted use.

Please cite Caffe in your publications if it helps your research:

@article{jia2014caffe,
  Author = {Jia, Yangqing and Shelhamer, Evan and Donahue, Jeff and Karayev, Sergey and Long, Jonathan and Girshick, Ross and Guadarrama, Sergio and Darrell, Trevor},
  Journal = {arXiv preprint arXiv:1408.5093},
  Title = {Caffe: Convolutional Architecture for Fast Feature Embedding},
  Year = {2014}
}

About

This fork of BVLC/Caffe is dedicated to improving performance of this deep learning framework when running on CPU, in particular Intel® Xeon processors (HSW+) and Intel® Xeon Phi processors

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 84.6%
  • Python 5.5%
  • Cuda 3.3%
  • CMake 2.6%
  • MATLAB 1.2%
  • Protocol Buffer 1.0%
  • Other 1.8%