Skip to content

maplewei/MyCaffe

 
 

Repository files navigation

Welcome to MyCaffe!

MyCaffe is a complete C# re-write of the native C++ CAFFE[1] open source project.

MyCaffe allows Windows C# software developers to use and expand deep learning solutions in their native C# language. All layers except for a few, and nearly every unit test are now provided in C#. Windows programmers can now write their own custom layers in the C# language, yet still enjoy the benefit of an efficient deep learning architecture that supports multi-GPU training on up to 8 headless GPU's using NCCL 1.3.4 ('Nickel').

Now you can create custom layers for MyCaffe in native C# using the full extent of the Windows .NET Framwork!

We have made a large effort to keep the MyCaffe C# code true to the original down to comment with the hope of making it even easier to extend the general CAFFE architecture for all. In addition, MyCaffe uses the same Proto Buffer file format for solver and model descriptions and model binary files allowing an easy exchange between the MyCaffe and C++ CAFFE platforms.

Most of the MyCaffe C# code is very similar to the C++ CAFFE code, for our goal is to extend the CAFFE platform to C# programmers, while maintaining compatibility with CAFFE's solver descriptions, model descriptions and binary weight format.

The C# based MyCaffe open-source project is independently maintained by SignalPop LLC and made available under the Apache 2.0 License.

Supported Development Environments:

* Visual Studio 2017 & CUDA 10.1.243 & cuDnn 7.6.2
* Visual Studio 2015 & CUDA 10.1.243 & cuDnn 7.6.2

NOTE: Compute 5.3 now required for CUDA 10.1.243/cuDNN 7.6.2 to support __half sized memory.

IMPORTANT: The open-source MyCaffe project on GitHub is considered 'pre-release' and may have bugs. When you find bugs or other issues, please report them here - or better yet, get involved and propose a fix!

We have several new models supported by MyCaffe with the train_val and solution prototxt ready to go:

  • Domain-Adversarial Neural Networks (DANN) as described in [2] with support for source and target datasets.
  • ResNet-56 on the Cifar-10 dataset as described in [3].
  • Deep convolutional auto-encoder neural networks with pooling as described in [4].
  • Policy Gradient Reinforcement Learning networks as described in [5].
  • Recurrent Learning of Char-RNN as described in [8] and [9].
  • Neural Style Transfer as described in [10] and [11] using the VGG model described in [12]
  • Deep Q-Learning [14][15] with Noisy-Net [16] and Prioritized Replay Buffer [17]

For more information on the MyCaffe implementation of Policy Gradient Reinforcement Learning, see MyCaffe: A Complete C# Re-Write of Caffe with Reinforcement Learning by D. Brown, 2018.

MyCaffe now supports the Arcade-Learning-Environment by [6] based on the Stella Atari-2600 emulator from [7], via the AleControl from SignalPop.
For more information, get the AleControl on Nuget, or visit the AleControl on Github.

License and Citation

MyCaffe is released under the [Apache License 2.0](https://github.com/MyCaffe/MyCaffe/blob/master/LICENSE).

Please cite MyCaffe in your publications and projects if MyCaffe helps you in your research or applications:


	@article 
	{
	  brown2018mycaffe,
	  Author = {Brown, David W.}
	  Journal = {arXiv preprint arXiv:1810.02272},
	  Title = {MyCaffe: A Complete C# Re-Write of Caffe with Reinforcement Learning}
	  Year = {2018}
	  Link = {https://arxiv.org/abs/1810.02272}
	}

[1] CAFFE: Convolutional Architecture for Fast Feature Embedding by Yangqing Jai, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell, 2014.

[2] Domain-Adversarial Training of Neural Networks by Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky, 2015.

[3] ResNet 20/32/44/56/110 for CIFAR10 with caffe by Yihui He, 2016.

[4] A Deep Convolutional Auto-Encoder with Pooling - Unpooling Layers in Caffe by Volodymyr Turchenko, Eric Chalmers and Artur Luczac, 2017.

[5] Deep Reinforcement Learning: Pong from Pixels by Andrej Karpathy, 2015.

[6] The Arcade Learning Environment: An Evaluation Platform for General Agents by Marc G. Bellemare, Yavar Naddaf, Joel Veness and Michael Bowling, 2012-2013. Source code available on GitHub at mgbellemare/Arcade-Learning-Envrionment

[7] Stella - A multi-platform Atari 2600 VCS emulator by Bradford W. Mott, Stephen Anthony and The Stella Team, 1995-2018 Source code available on GitHub at stella-emu/stella

[8] The Unreasonable Effectiveness of Recurrent Neural Networks by Andrej Karpathy, 2015.

[9] adepierre/caffe-char-rnn Github by adepierre, 2017.

[10] A Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Matthias Bethge, 2015, arXiv:1508:06576

[11] ftokarev/caffe Github by ftokarev, 2017

[12] Very Deep Convolutional Networks for Large-Scale Image Recognition by K. Simonyan, A. Zisserman, arXiv:1409.1556

[14] GitHub: Google/dopamine licensed under the Apache 2.0 License;

[15] Dopamine: A Research Framework for Deep Reinforcement Learning by Pablo Samuel Castro, Subhodeep Moitra, Carles Gelada, Saurabh Kumar, Marc G. Bellemare, 2018, arXiv:1812.06110

[16] Noisy Networks for Exploration by Meire Fortunato, Mohammad Gheshlaghi Azar, Bilal Piot, Jacob Menick, Ian Osband, Alex Graves, Vlad Mnih, Remi Munos, Demis Hassabis, Olivier Pietquin, Charles Blundell, Shane Legg, 2018, arXiv:1706.10295

[17] Prioritized Experience Replay by Tom Schaul, John Quan, Ioannis Antonoglou, David Silver, 2016, arXiv:1511.05952

For more information on the C++ CAFFE open-source project, please see the following link.

About

A complete deep learning platform written almost entirely in C# for Windows developers! Now you can write your own layers in C#!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 88.2%
  • Cuda 7.9%
  • C++ 3.5%
  • Other 0.4%