Skip to content

Commit 6db5357

Browse files
committed
added bagua-caffe
1 parent a87862d commit 6db5357

File tree

638 files changed

+158677
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

638 files changed

+158677
-0
lines changed

bagua-caffe/.Doxyfile

Lines changed: 2335 additions & 0 deletions
Large diffs are not rendered by default.

bagua-caffe/.gitignore

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
## General
2+
3+
# Compiled Object files
4+
*.slo
5+
*.lo
6+
*.o
7+
*.cuo
8+
9+
# Compiled Dynamic libraries
10+
*.so
11+
*.dylib
12+
13+
# Compiled Static libraries
14+
*.lai
15+
*.la
16+
*.a
17+
18+
# Compiled protocol buffers
19+
*.pb.h
20+
*.pb.cc
21+
*_pb2.py
22+
23+
# Compiled python
24+
*.pyc
25+
26+
# Compiled MATLAB
27+
*.mex*
28+
29+
# IPython notebook checkpoints
30+
.ipynb_checkpoints
31+
32+
# Editor temporaries
33+
*.swp
34+
*~
35+
36+
# Sublime Text settings
37+
*.sublime-workspace
38+
*.sublime-project
39+
40+
# Eclipse Project settings
41+
*.*project
42+
.settings
43+
44+
# QtCreator files
45+
*.user
46+
47+
# PyCharm files
48+
.idea
49+
50+
# Visual Studio Code files
51+
.vscode
52+
53+
# OSX dir files
54+
.DS_Store
55+
56+
## Caffe
57+
58+
# User's build configuration
59+
#Makefile.config
60+
61+
# Data and models are either
62+
# 1. reference, and not casually committed
63+
# 2. custom, and live on their own unless they're deliberated contributed
64+
*.caffemodel
65+
*.caffemodel.h5
66+
*.solverstate
67+
*.solverstate.h5
68+
*.binaryproto
69+
*leveldb
70+
*lmdb
71+
72+
# build, distribute, and bins (+ python proto bindings)
73+
build
74+
.build_debug/*
75+
.build_release/*
76+
distribute/*
77+
*.testbin
78+
*.bin
79+
python/caffe/proto/
80+
cmake_build
81+
.cmake_build
82+
83+
# Generated documentation
84+
docs/_site
85+
docs/gathered
86+
_site
87+
doxygen
88+
docs/dev
89+
90+
# LevelDB files
91+
*.sst
92+
*.ldb
93+
LOCK
94+
LOG*
95+
CURRENT
96+
MANIFEST-*
97+
98+
# temporary directories
99+
jobs
100+
temp
101+
examples/*/*lmdb

bagua-caffe/.travis.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
dist: trusty
2+
sudo: required
3+
4+
language: cpp
5+
compiler: gcc
6+
7+
env:
8+
global:
9+
- NUM_THREADS=4
10+
matrix:
11+
# Use a build matrix to test many builds in parallel
12+
# envvar defaults:
13+
# WITH_CMAKE: false
14+
# WITH_PYTHON3: false
15+
# WITH_IO: true
16+
# WITH_CUDA: false
17+
# WITH_CUDNN: false
18+
- BUILD_NAME="default-make"
19+
# - BUILD_NAME="python3-make" WITH_PYTHON3=true
20+
- BUILD_NAME="no-io-make" WITH_IO=false
21+
- BUILD_NAME="cuda-make" WITH_CUDA=true
22+
- BUILD_NAME="cudnn-make" WITH_CUDA=true WITH_CUDNN=true
23+
24+
- BUILD_NAME="default-cmake" WITH_CMAKE=true
25+
- BUILD_NAME="python3-cmake" WITH_CMAKE=true WITH_PYTHON3=true
26+
- BUILD_NAME="no-io-cmake" WITH_CMAKE=true WITH_IO=false
27+
- BUILD_NAME="cuda-cmake" WITH_CMAKE=true WITH_CUDA=true
28+
- BUILD_NAME="cudnn-cmake" WITH_CMAKE=true WITH_CUDA=true WITH_CUDNN=true
29+
30+
cache:
31+
apt: true
32+
directories:
33+
- ~/protobuf3
34+
35+
before_install:
36+
- source ./scripts/travis/defaults.sh
37+
38+
install:
39+
- sudo -E ./scripts/travis/install-deps.sh
40+
- ./scripts/travis/setup-venv.sh ~/venv
41+
- source ~/venv/bin/activate
42+
- ./scripts/travis/install-python-deps.sh
43+
44+
before_script:
45+
- ./scripts/travis/configure.sh
46+
47+
script:
48+
- ./scripts/travis/build.sh
49+
- ./scripts/travis/test.sh
50+
51+
notifications:
52+
# Emails are sent to the committer's git-configured email address by default,
53+
# but only if they have access to the repository. To enable Travis on your
54+
# public fork of Caffe, just go to travis-ci.org and flip the switch on for
55+
# your Caffe fork. To configure your git email address, use:
56+
# git config --global user.email me@example.com
57+
email:
58+
on_success: always
59+
on_failure: always
60+
61+
# IRC notifications disabled by default.
62+
# Uncomment next 5 lines to send notifications to chat.freenode.net#caffe
63+
# irc:
64+
# channels:
65+
# - "chat.freenode.net#caffe"
66+
# template:
67+
# - "%{repository}/%{branch} (%{commit} - %{author}): %{message}"

bagua-caffe/CMakeLists.txt

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
cmake_minimum_required(VERSION 2.8.7)
2+
if(POLICY CMP0046)
3+
cmake_policy(SET CMP0046 NEW)
4+
endif()
5+
if(POLICY CMP0054)
6+
cmake_policy(SET CMP0054 NEW)
7+
endif()
8+
9+
# ---[ Caffe project
10+
project(Caffe C CXX)
11+
12+
# ---[ Caffe version
13+
set(CAFFE_TARGET_VERSION "1.0.0-rc3" CACHE STRING "Caffe logical version")
14+
set(CAFFE_TARGET_SOVERSION "1.0.0-rc3" CACHE STRING "Caffe soname version")
15+
add_definitions(-DCAFFE_VERSION=${CAFFE_TARGET_VERSION})
16+
17+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES")
18+
19+
# ---[ Using cmake scripts and modules
20+
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
21+
22+
include(ExternalProject)
23+
24+
include(cmake/Utils.cmake)
25+
include(cmake/Targets.cmake)
26+
include(cmake/Misc.cmake)
27+
include(cmake/Summary.cmake)
28+
include(cmake/ConfigGen.cmake)
29+
30+
# ---[ Options
31+
caffe_option(CPU_ONLY "Build Caffe without CUDA support" OFF) # TODO: rename to USE_CUDA
32+
caffe_option(USE_CUDNN "Build Caffe with cuDNN library support" ON IF NOT CPU_ONLY)
33+
caffe_option(BUILD_SHARED_LIBS "Build shared libraries" ON)
34+
caffe_option(BUILD_python "Build Python wrapper" ON)
35+
set(python_version "2" CACHE STRING "Specify which Python version to use")
36+
caffe_option(BUILD_matlab "Build Matlab wrapper" OFF IF UNIX OR APPLE)
37+
caffe_option(BUILD_docs "Build documentation" ON IF UNIX OR APPLE)
38+
caffe_option(BUILD_python_layer "Build the Caffe Python layer" ON)
39+
caffe_option(USE_OPENCV "Build with OpenCV support" ON)
40+
caffe_option(USE_LEVELDB "Build with levelDB" ON)
41+
caffe_option(USE_LMDB "Build with lmdb" ON)
42+
caffe_option(ALLOW_LMDB_NOLOCK "Allow MDB_NOLOCK when reading LMDB files (only if necessary)" OFF)
43+
44+
# ---[ Dependencies
45+
include(cmake/Dependencies.cmake)
46+
47+
# ---[ Flags
48+
if(UNIX OR APPLE)
49+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall")
50+
endif()
51+
52+
caffe_set_caffe_link()
53+
54+
if(USE_libstdcpp)
55+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
56+
message("-- Warning: forcing libstdc++ (controlled by USE_libstdcpp option in cmake)")
57+
endif()
58+
59+
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE)
60+
61+
# ---[ Warnings
62+
caffe_warnings_disable(CMAKE_CXX_FLAGS -Wno-sign-compare -Wno-uninitialized)
63+
64+
# ---[ Config generation
65+
configure_file(cmake/Templates/caffe_config.h.in "${PROJECT_BINARY_DIR}/caffe_config.h")
66+
67+
# ---[ Includes
68+
set(Caffe_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
69+
include_directories(${Caffe_INCLUDE_DIR} ${PROJECT_BINARY_DIR})
70+
include_directories(BEFORE src) # This is needed for gtest.
71+
72+
# ---[ Subdirectories
73+
add_subdirectory(src/gtest)
74+
add_subdirectory(src/caffe)
75+
add_subdirectory(tools)
76+
add_subdirectory(examples)
77+
add_subdirectory(python)
78+
add_subdirectory(matlab)
79+
add_subdirectory(docs)
80+
81+
# ---[ Linter target
82+
add_custom_target(lint COMMAND ${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/cmake/lint.cmake)
83+
84+
# ---[ pytest target
85+
if(BUILD_python)
86+
add_custom_target(pytest COMMAND python${python_version} -m unittest discover -s caffe/test WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/python )
87+
add_dependencies(pytest pycaffe)
88+
endif()
89+
90+
# ---[ Configuration summary
91+
caffe_print_configuration_summary()
92+
93+
# ---[ Export configs generation
94+
caffe_generate_export_configs()

bagua-caffe/CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
3+
## Issues
4+
5+
Specific Caffe design and development issues, bugs, and feature requests are maintained by GitHub Issues.
6+
7+
_Please do not post usage, installation, or modeling questions, or other requests for help to Issues._
8+
Use the [caffe-users list](https://groups.google.com/forum/#!forum/caffe-users) instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.
9+
10+
When reporting a bug, it's most helpful to provide the following information, where applicable:
11+
12+
* What steps reproduce the bug?
13+
* Can you reproduce the bug using the latest [master](https://github.com/BVLC/caffe/tree/master), compiled with the `DEBUG` make option?
14+
* What hardware and operating system/distribution are you running?
15+
* If the bug is a crash, provide the backtrace (usually printed by Caffe; always obtainable with `gdb`).
16+
17+
Try to give your issue a title that is succinct and specific. The devs will rename issues as needed to keep track of them.
18+
19+
## Pull Requests
20+
21+
Caffe welcomes all contributions.
22+
23+
See the [contributing guide](http://caffe.berkeleyvision.org/development.html) for details.
24+
25+
Briefly: read commit by commit, a PR should tell a clean, compelling story of _one_ improvement to Caffe. In particular:
26+
27+
* A PR should do one clear thing that obviously improves Caffe, and nothing more. Making many smaller PRs is better than making one large PR; review effort is superlinear in the amount of code involved.
28+
* Similarly, each commit should be a small, atomic change representing one step in development. PRs should be made of many commits where appropriate.
29+
* Please do rewrite PR history to be clean rather than chronological. Within-PR bugfixes, style cleanups, reversions, etc. should be squashed and should not appear in merged PR history.
30+
* Anything nonobvious from the code should be explained in comments, commit messages, or the PR description, as appropriate.

bagua-caffe/CONTRIBUTORS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Contributors
2+
3+
Caffe is developed by a core set of BVLC members and the open-source community.
4+
5+
We thank all of our [contributors](https://github.com/BVLC/caffe/graphs/contributors)!
6+
7+
**For the detailed history of contributions** of a given file, try
8+
9+
git blame file
10+
11+
to see line-by-line credits and
12+
13+
git log --follow file
14+
15+
to see the change log even across renames and rewrites.
16+
17+
Please refer to the [acknowledgements](http://caffe.berkeleyvision.org/#acknowledgements) on the Caffe site for further details.
18+
19+
**Copyright** is held by the original contributor according to the versioning history; see LICENSE.

bagua-caffe/INSTALL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Installation
2+
3+
See http://caffe.berkeleyvision.org/installation.html for the latest
4+
installation instructions.
5+
6+
Check the users group in case you need help:
7+
https://groups.google.com/forum/#!forum/caffe-users

bagua-caffe/LICENSE

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
COPYRIGHT
2+
3+
All new contributions compared to the original branch:
4+
Copyright (c) 2015, 2016 Wei Liu (UNC Chapel Hill), Dragomir Anguelov (Zoox),
5+
Dumitru Erhan (Google), Christian Szegedy (Google), Scott Reed (UMich Ann Arbor),
6+
Cheng-Yang Fu (UNC Chapel Hill), Alexander C. Berg (UNC Chapel Hill).
7+
All rights reserved.
8+
9+
All contributions by the University of California:
10+
Copyright (c) 2014, 2015, The Regents of the University of California (Regents)
11+
All rights reserved.
12+
13+
All other contributions:
14+
Copyright (c) 2014, 2015, the respective contributors
15+
All rights reserved.
16+
17+
Caffe uses a shared copyright model: each contributor holds copyright over
18+
their contributions to Caffe. The project versioning records all such
19+
contribution and copyright details. If a contributor wants to further mark
20+
their specific copyright on a particular contribution, they should indicate
21+
their copyright solely in the commit message of the change when it is
22+
committed.
23+
24+
LICENSE
25+
26+
Redistribution and use in source and binary forms, with or without
27+
modification, are permitted provided that the following conditions are met:
28+
29+
1. Redistributions of source code must retain the above copyright notice, this
30+
list of conditions and the following disclaimer.
31+
2. Redistributions in binary form must reproduce the above copyright notice,
32+
this list of conditions and the following disclaimer in the documentation
33+
and/or other materials provided with the distribution.
34+
35+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
36+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
37+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
39+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
40+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
41+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
42+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
44+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45+
46+
CONTRIBUTION AGREEMENT
47+
48+
By contributing to the BVLC/caffe repository through pull-request, comment,
49+
or otherwise, the contributor releases their content to the
50+
license and copyright terms herein.

0 commit comments

Comments
 (0)