Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ to see line-by-line credits and
to see the change log even across renames and rewrites.

Please refer to the [acknowledgements](http://caffe.berkeleyvision.org/#acknowledgements) on the Caffe site for further details.

**Copyright** is held by the original contributor according to the versioning history; see LICENSE.
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
COPYRIGHT

All contributions by the University of California:
Copyright (c) 2014, The Regents of the University of California (Regents)
All rights reserved.

All other contributions:
Copyright (c) 2014, the respective contributors
All rights reserved.

Caffe uses a shared copyright model: each contributor holds copyright over
their contributions to Caffe. The project versioning records all such
contribution and copyright details. If a contributor wants to further mark
their specific copyright on a particular contribution, they should indicate
their copyright solely in the commit message of the change when it is
committed.

LICENSE

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Expand All @@ -20,3 +36,9 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

CONTRIBUTION AGREEMENT

By contributing to the BVLC/caffe repository through pull-request, comment,
or otherwise, the contributor releases their content to the
license and copyright terms herein.
22 changes: 13 additions & 9 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ title: Development
Caffe is developed with active participation of the community.<br />
The [BVLC](http://bvlc.eecs.berkeley.edu/) maintainers welcome all contributions!

The exact details of contributions are recorded by versioning and cited in our [acknowledgements](http://caffe.berkeleyvision.org/#acknowledgements).
This method is impartial and always up-to-date.

## License

Caffe is licensed under the terms in [LICENSE](https://github.com/BVLC/caffe/blob/master/LICENSE). By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.

## Copyright

Caffe uses a shared copyright model: each contributor holds copyright over their contributions to Caffe. The project versioning records all such contribution and copyright details.

If a contributor wants to further mark their specific copyright on a particular contribution, they should indicate their copyright solely in the commit message of the change when it is committed. Do not include copyright notices in files for this purpose.

### Documentation

This website, written with [Jekyll](http://jekyllrb.com/), functions as the official Caffe documentation -- simply run `scripts/build_docs.sh` and view the website at `http://0.0.0.0:4000`.
Expand Down Expand Up @@ -109,12 +122,3 @@ To get a list of all options `googletest` provides, simply pass the `--help` fla
- Wrap lines at 80 chars.
- Remember that “a foolish consistency is the hobgoblin of little minds,” so use your best judgement to write the clearest code for your particular case.
- **Run `make lint` to check C++ code.**

### Copyright

Assign copyright jointly to BVLC and contributors like so:

// Copyright 2014 BVLC and contributors.

The exact details of contributions are recorded by versioning and cited in our [acknowledgements](http://caffe.berkeleyvision.org/#acknowledgements).
This method is impartial and always up-to-date.
1 change: 0 additions & 1 deletion examples/cifar10/convert_cifar_data.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright 2014 BVLC and contributors.
//
// This script converts the CIFAR dataset to the leveldb format used
// by caffe to perform classification.
Expand Down
1 change: 0 additions & 1 deletion examples/mnist/convert_mnist_data.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright 2014 BVLC and contributors.
//
// This script converts the MNIST dataset to the leveldb format used
// by caffe to perform classification.
Expand Down
2 changes: 0 additions & 2 deletions include/caffe/blob.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_BLOB_HPP_
#define CAFFE_BLOB_HPP_

Expand Down
1 change: 0 additions & 1 deletion include/caffe/caffe.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright 2014 BVLC and contributors.
// caffe.hpp is the header file that you need to include in your code. It wraps
// all the internal caffe header files into one for simpler inclusion.

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/common.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_COMMON_HPP_
#define CAFFE_COMMON_HPP_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/common_layers.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_COMMON_LAYERS_HPP_
#define CAFFE_COMMON_LAYERS_HPP_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/data_layers.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_DATA_LAYERS_HPP_
#define CAFFE_DATA_LAYERS_HPP_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/filler.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

// Fillers are random number generators that fills a blob using the specified
// algorithm. The expectation is that they are only going to be used during
// initialization time and will not involve any GPUs.
Expand Down
4 changes: 1 addition & 3 deletions include/caffe/internal_thread.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_INTERNAL_THREAD_HPP_
#define CAFFE_INTERNAL_THREAD_HPP_

Expand Down Expand Up @@ -28,7 +26,7 @@ class InternalThread {
}

protected:
/* Implement this method in your subclass
/* Implement this method in your subclass
with the code you want your thread to run. */
virtual void InternalThreadEntry() = 0;

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/layer.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_LAYER_H_
#define CAFFE_LAYER_H_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/loss_layers.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_LOSS_LAYERS_HPP_
#define CAFFE_LOSS_LAYERS_HPP_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/net.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_NET_HPP_
#define CAFFE_NET_HPP_

Expand Down
6 changes: 2 additions & 4 deletions include/caffe/neuron_layers.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_NEURON_LAYERS_HPP_
#define CAFFE_NEURON_LAYERS_HPP_

Expand Down Expand Up @@ -233,12 +231,12 @@ class TanHLayer : public NeuronLayer<Dtype> {

/* ThresholdLayer
Outputs 1 if value in input is above threshold, 0 otherwise.
The defult threshold = 0, which means positive values would become 1 and
The defult threshold = 0, which means positive values would become 1 and
negative or 0, would become 0

y = 1 if x > threshold
y = 0 if x <= threshold

y' = don't differenciable
*/
template <typename Dtype>
Expand Down
2 changes: 0 additions & 2 deletions include/caffe/solver.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_OPTIMIZATION_SOLVER_HPP_
#define CAFFE_OPTIMIZATION_SOLVER_HPP_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/syncedmem.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_SYNCEDMEM_HPP_
#define CAFFE_SYNCEDMEM_HPP_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/test/test_caffe_main.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

// The main caffe test code. Your test cpp code should include this hpp
// to allow a main function to be compiled into the binary.
#ifndef CAFFE_TEST_TEST_CAFFE_MAIN_HPP_
Expand Down
2 changes: 0 additions & 2 deletions include/caffe/test/test_gradient_check_util.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_TEST_GRADIENT_CHECK_UTIL_H_
#define CAFFE_TEST_GRADIENT_CHECK_UTIL_H_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/util/benchmark.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_UTIL_BENCHMARK_H_
#define CAFFE_UTIL_BENCHMARK_H_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/util/device_alternate.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_UTIL_DEVICE_ALTERNATE_H_
#define CAFFE_UTIL_DEVICE_ALTERNATE_H_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/util/im2col.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef _CAFFE_UTIL_IM2COL_HPP_
#define _CAFFE_UTIL_IM2COL_HPP_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/util/insert_splits.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef _CAFFE_UTIL_INSERT_SPLITS_HPP_
#define _CAFFE_UTIL_INSERT_SPLITS_HPP_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/util/io.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_UTIL_IO_H_
#define CAFFE_UTIL_IO_H_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/util/math_functions.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_UTIL_MATH_FUNCTIONS_H_
#define CAFFE_UTIL_MATH_FUNCTIONS_H_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/util/mkl_alternate.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_UTIL_MKL_ALTERNATE_H_
#define CAFFE_UTIL_MKL_ALTERNATE_H_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/util/rng.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_RNG_CPP_HPP_
#define CAFFE_RNG_CPP_HPP_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/util/upgrade_proto.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_UTIL_UPGRADE_PROTO_H_
#define CAFFE_UTIL_UPGRADE_PROTO_H_

Expand Down
2 changes: 0 additions & 2 deletions include/caffe/vision_layers.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_VISION_LAYERS_HPP_
#define CAFFE_VISION_LAYERS_HPP_

Expand Down
1 change: 0 additions & 1 deletion matlab/caffe/matcaffe.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright 2014 BVLC and contributors.
//
// matcaffe.cpp provides a wrapper of the caffe::Net class as well as some
// caffe::Caffe functions so that one could easily call it from matlab.
Expand Down
1 change: 0 additions & 1 deletion python/caffe/_caffe.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright 2014 BVLC and contributors.
// pycaffe provides a wrapper of the caffe::Net class as well as some
// caffe::Caffe functions so that one could easily call it from Python.
// Note that for Python, we will simply use float as the data type.
Expand Down
15 changes: 7 additions & 8 deletions scripts/cpp_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@
_error_suppressions = {}

# Finds Copyright.
_RE_COPYRIGHT = re.compile(r'Copyright \d\d\d\d BVLC and contributors.')
_RE_COPYRIGHT = re.compile(r'Copyright')

# The root directory used for deriving header guard CPP variable.
# This is set by --root flag.
Expand Down Expand Up @@ -1368,16 +1368,15 @@ def ReverseCloseExpression(clean_lines, linenum, pos):


def CheckForCopyright(filename, lines, error):
"""Logs an error if no Copyright message appears at the top of the file."""
"""Logs an error if a Copyright message appears at the top of the file."""

# We'll say it should occur by line 10. Don't forget there's a
# We'll check up to line 10. Don't forget there's a
# dummy line at the front.
for line in xrange(1, min(len(lines), 11)):
if _RE_COPYRIGHT.search(lines[line], re.I): break
else: # means no copyright line was found
error(filename, 0, 'legal/copyright', 5,
'BVLC copyright message not found. '
'You should have a line: "Copyright [year] BVLC and contributors."')
if _RE_COPYRIGHT.search(lines[line], re.I):
error(filename, 0, 'legal/copyright', 5,
'Copyright message found. '
'You should not include a copyright line.')


def GetHeaderGuardCPPVariable(filename):
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/blob.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include "caffe/blob.hpp"
#include "caffe/common.hpp"
#include "caffe/syncedmem.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/common.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <gflags/gflags.h>
#include <glog/logging.h>
#include <cstdio>
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layer_factory.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#ifndef CAFFE_LAYER_FACTORY_HPP_
#define CAFFE_LAYER_FACTORY_HPP_

Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/accuracy_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <algorithm>
#include <functional>
#include <utility>
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/argmax_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <algorithm>
#include <functional>
#include <utility>
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/bnll_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <algorithm>
#include <vector>

Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/bnll_layer.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <algorithm>
#include <vector>

Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/concat_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <vector>

#include "caffe/layer.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/concat_layer.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <vector>

#include "caffe/layer.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/conv_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <vector>

#include "caffe/filler.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/conv_layer.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <vector>

#include "caffe/filler.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/data_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <leveldb/db.h>
#include <stdint.h>

Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/data_layer.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <string>
#include <vector>

Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/dropout_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

// TODO (sergeyk): effect should not be dependent on phase. wasted memcpy.

#include <vector>
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/dropout_layer.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <algorithm>
#include <limits>
#include <vector>
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/dummy_data_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <vector>

#include "caffe/filler.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/caffe/layers/eltwise_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2014 BVLC and contributors.

#include <vector>

#include "caffe/layer.hpp"
Expand Down
Loading