diff --git a/Makefile b/Makefile index 62e5158b9bd..84f8db26abb 100644 --- a/Makefile +++ b/Makefile @@ -295,7 +295,7 @@ SUPERCLEAN_EXTS := .so .a .o .bin .testbin .pb.cc .pb.h _pb2.py .cuo ############################## # Define build targets ############################## -.PHONY: all test clean linecount lint tools examples $(DIST_ALIASES) \ +.PHONY: all test clean linecount lint lintclean tools examples $(DIST_ALIASES) \ py mat py$(PROJECT) mat$(PROJECT) proto runtest \ superclean supercleanlist supercleanfiles warn everything @@ -308,6 +308,9 @@ linecount: lint: $(EMPTY_LINT_REPORT) +lintclean: + @ $(RM) -r $(LINT_OUTPUT_DIR) $(EMPTY_LINT_REPORT) $(NONEMPTY_LINT_REPORT) + $(EMPTY_LINT_REPORT): $(LINT_OUTPUTS) | $(BUILD_DIR) @ cat $(LINT_OUTPUTS) > $@ @ if [ -s "$@" ]; then \ diff --git a/examples/cifar10/convert_cifar_data.cpp b/examples/cifar10/convert_cifar_data.cpp index 8e223b212ad..d1f3f3e0e9f 100644 --- a/examples/cifar10/convert_cifar_data.cpp +++ b/examples/cifar10/convert_cifar_data.cpp @@ -7,14 +7,14 @@ // The CIFAR dataset could be downloaded at // http://www.cs.toronto.edu/~kriz/cifar.html -#include -#include -#include - -#include #include // NOLINT(readability/streams) #include +#include "glog/logging.h" +#include "google/protobuf/text_format.h" +#include "leveldb/db.h" +#include "stdint.h" + #include "caffe/proto/caffe.pb.h" using std::string; diff --git a/examples/mnist/convert_mnist_data.cpp b/examples/mnist/convert_mnist_data.cpp index 593a2d23313..c2cf4b3af33 100644 --- a/examples/mnist/convert_mnist_data.cpp +++ b/examples/mnist/convert_mnist_data.cpp @@ -7,14 +7,14 @@ // The MNIST dataset could be downloaded at // http://yann.lecun.com/exdb/mnist/ -#include -#include -#include - -#include #include // NOLINT(readability/streams) #include +#include "glog/logging.h" +#include "google/protobuf/text_format.h" +#include "leveldb/db.h" +#include "stdint.h" + #include "caffe/proto/caffe.pb.h" uint32_t swap_endian(uint32_t val) { diff --git a/include/caffe/blob.hpp b/include/caffe/blob.hpp index ab7a0f60f80..2086c5119bc 100644 --- a/include/caffe/blob.hpp +++ b/include/caffe/blob.hpp @@ -4,8 +4,8 @@ #define CAFFE_BLOB_HPP_ #include "caffe/common.hpp" -#include "caffe/syncedmem.hpp" #include "caffe/proto/caffe.pb.h" +#include "caffe/syncedmem.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { diff --git a/include/caffe/common_layers.hpp b/include/caffe/common_layers.hpp index 5d872452ae2..ed11487c6f3 100644 --- a/include/caffe/common_layers.hpp +++ b/include/caffe/common_layers.hpp @@ -9,10 +9,10 @@ #include "caffe/blob.hpp" #include "caffe/common.hpp" +#include "caffe/data_layers.hpp" #include "caffe/layer.hpp" -#include "caffe/neuron_layers.hpp" #include "caffe/loss_layers.hpp" -#include "caffe/data_layers.hpp" +#include "caffe/neuron_layers.hpp" #include "caffe/proto/caffe.pb.h" namespace caffe { diff --git a/include/caffe/data_layers.hpp b/include/caffe/data_layers.hpp index 107d7800d1e..f868b2869da 100644 --- a/include/caffe/data_layers.hpp +++ b/include/caffe/data_layers.hpp @@ -7,17 +7,17 @@ #include #include +#include "boost/scoped_ptr.hpp" +#include "hdf5.h" #include "leveldb/db.h" #include "lmdb.h" -#include "hdf5.h" -#include "boost/scoped_ptr.hpp" #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" +#include "caffe/internal_thread.hpp" #include "caffe/layer.hpp" #include "caffe/proto/caffe.pb.h" -#include "caffe/internal_thread.hpp" namespace caffe { diff --git a/include/caffe/filler.hpp b/include/caffe/filler.hpp index 242f11a3513..beeee01dcb9 100644 --- a/include/caffe/filler.hpp +++ b/include/caffe/filler.hpp @@ -9,11 +9,11 @@ #include -#include "caffe/common.hpp" #include "caffe/blob.hpp" +#include "caffe/common.hpp" +#include "caffe/proto/caffe.pb.h" #include "caffe/syncedmem.hpp" #include "caffe/util/math_functions.hpp" -#include "caffe/proto/caffe.pb.h" namespace caffe { diff --git a/include/caffe/loss_layers.hpp b/include/caffe/loss_layers.hpp index fb7f5539674..73a677b624a 100644 --- a/include/caffe/loss_layers.hpp +++ b/include/caffe/loss_layers.hpp @@ -7,10 +7,10 @@ #include #include -#include "leveldb/db.h" -#include "pthread.h" #include "boost/scoped_ptr.hpp" #include "hdf5.h" +#include "leveldb/db.h" +#include "pthread.h" #include "caffe/blob.hpp" #include "caffe/common.hpp" diff --git a/include/caffe/neuron_layers.hpp b/include/caffe/neuron_layers.hpp index 8f0588d4771..4b3f6f4394d 100644 --- a/include/caffe/neuron_layers.hpp +++ b/include/caffe/neuron_layers.hpp @@ -7,9 +7,9 @@ #include #include -#include "pthread.h" #include "boost/scoped_ptr.hpp" #include "hdf5.h" +#include "pthread.h" #include "caffe/blob.hpp" #include "caffe/common.hpp" diff --git a/include/caffe/test/test_caffe_main.hpp b/include/caffe/test/test_caffe_main.hpp index 9e7b85944da..759e01a2629 100644 --- a/include/caffe/test/test_caffe_main.hpp +++ b/include/caffe/test/test_caffe_main.hpp @@ -8,8 +8,8 @@ #include #include -#include #include +#include #include "caffe/common.hpp" diff --git a/include/caffe/util/io.hpp b/include/caffe/util/io.hpp index 631dbe7ca64..4f517ff1d71 100644 --- a/include/caffe/util/io.hpp +++ b/include/caffe/util/io.hpp @@ -8,9 +8,9 @@ #include "google/protobuf/message.h" #include "hdf5.h" #include "hdf5_hl.h" -#include "caffe/proto/caffe.pb.h" #include "caffe/blob.hpp" +#include "caffe/proto/caffe.pb.h" #define HDF5_NUM_DIMS 4 diff --git a/include/caffe/util/rng.hpp b/include/caffe/util/rng.hpp index 2b79ef1801b..f774d704569 100644 --- a/include/caffe/util/rng.hpp +++ b/include/caffe/util/rng.hpp @@ -3,10 +3,12 @@ #ifndef CAFFE_RNG_CPP_HPP_ #define CAFFE_RNG_CPP_HPP_ -#include -#include -#include #include +#include + +#include "boost/random/mersenne_twister.hpp" +#include "boost/random/uniform_int.hpp" + #include "caffe/common.hpp" namespace caffe { diff --git a/matlab/caffe/matcaffe.cpp b/matlab/caffe/matcaffe.cpp index 2aad3192a65..d0e98f8319d 100644 --- a/matlab/caffe/matcaffe.cpp +++ b/matlab/caffe/matcaffe.cpp @@ -8,6 +8,7 @@ #include #include "mex.h" + #include "caffe/caffe.hpp" #define MEX_ARGS int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs diff --git a/scripts/cpp_lint.py b/scripts/cpp_lint.py index 76eee4b2dbe..3f0ca1c3527 100755 --- a/scripts/cpp_lint.py +++ b/scripts/cpp_lint.py @@ -210,7 +210,6 @@ # off by default (i.e., categories that must be enabled by the --filter= flags). # All entries here should start with a '-' or '+', as in the --filter= flag. _DEFAULT_FILTERS = [ - '-build/include_alpha', '-build/include_dir', '-readability/todo', ] diff --git a/src/caffe/layer_factory.cpp b/src/caffe/layer_factory.cpp index de960214153..1165abc6da8 100644 --- a/src/caffe/layer_factory.cpp +++ b/src/caffe/layer_factory.cpp @@ -6,8 +6,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/proto/caffe.pb.h" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/accuracy_layer.cpp b/src/caffe/layers/accuracy_layer.cpp index 7c913114abc..f99b01dc105 100644 --- a/src/caffe/layers/accuracy_layer.cpp +++ b/src/caffe/layers/accuracy_layer.cpp @@ -6,9 +6,9 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" -#include "caffe/util/math_functions.hpp" #include "caffe/util/io.hpp" +#include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/concat_layer.cpp b/src/caffe/layers/concat_layer.cpp index dd899a57c85..32203a8d980 100644 --- a/src/caffe/layers/concat_layer.cpp +++ b/src/caffe/layers/concat_layer.cpp @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/concat_layer.cu b/src/caffe/layers/concat_layer.cu index 2643d7441c8..1a97f02a62a 100644 --- a/src/caffe/layers/concat_layer.cu +++ b/src/caffe/layers/concat_layer.cu @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/conv_layer.cpp b/src/caffe/layers/conv_layer.cpp index c7949e049cd..ca63e976e80 100644 --- a/src/caffe/layers/conv_layer.cpp +++ b/src/caffe/layers/conv_layer.cpp @@ -2,11 +2,11 @@ #include +#include "caffe/filler.hpp" #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/im2col.hpp" -#include "caffe/filler.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/conv_layer.cu b/src/caffe/layers/conv_layer.cu index fc114b0b328..616a81a1388 100644 --- a/src/caffe/layers/conv_layer.cu +++ b/src/caffe/layers/conv_layer.cu @@ -2,11 +2,11 @@ #include +#include "caffe/filler.hpp" #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/im2col.hpp" -#include "caffe/filler.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/data_layer.cpp b/src/caffe/layers/data_layer.cpp index ef27c1a3f1f..ddc7f770b46 100644 --- a/src/caffe/layers/data_layer.cpp +++ b/src/caffe/layers/data_layer.cpp @@ -1,17 +1,17 @@ // Copyright 2014 BVLC and contributors. -#include #include +#include #include #include #include "caffe/layer.hpp" +#include "caffe/proto/caffe.pb.h" #include "caffe/util/io.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/util/rng.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/proto/caffe.pb.h" namespace caffe { diff --git a/src/caffe/layers/data_layer.cu b/src/caffe/layers/data_layer.cu index e275e9d913e..fcbf2346840 100644 --- a/src/caffe/layers/data_layer.cu +++ b/src/caffe/layers/data_layer.cu @@ -1,12 +1,12 @@ // Copyright 2014 BVLC and contributors. -#include -#include -#include - #include #include +#include "leveldb/db.h" +#include "pthread.h" +#include "stdint.h" + #include "caffe/layer.hpp" #include "caffe/util/io.hpp" #include "caffe/vision_layers.hpp" diff --git a/src/caffe/layers/dropout_layer.cpp b/src/caffe/layers/dropout_layer.cpp index 65360d67ada..605aa151196 100644 --- a/src/caffe/layers/dropout_layer.cpp +++ b/src/caffe/layers/dropout_layer.cpp @@ -5,9 +5,9 @@ #include #include "caffe/common.hpp" -#include "caffe/util/math_functions.hpp" #include "caffe/layer.hpp" #include "caffe/syncedmem.hpp" +#include "caffe/util/math_functions.hpp" #include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/dropout_layer.cu b/src/caffe/layers/dropout_layer.cu index 158456f9bc5..8befa4d87fb 100644 --- a/src/caffe/layers/dropout_layer.cu +++ b/src/caffe/layers/dropout_layer.cu @@ -7,8 +7,8 @@ #include "caffe/common.hpp" #include "caffe/layer.hpp" #include "caffe/syncedmem.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/eltwise_layer.cpp b/src/caffe/layers/eltwise_layer.cpp index 44bad932a11..09ca66f38e8 100644 --- a/src/caffe/layers/eltwise_layer.cpp +++ b/src/caffe/layers/eltwise_layer.cpp @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/eltwise_layer.cu b/src/caffe/layers/eltwise_layer.cu index 99c14feace1..d47d24afad7 100644 --- a/src/caffe/layers/eltwise_layer.cu +++ b/src/caffe/layers/eltwise_layer.cu @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/euclidean_loss_layer.cpp b/src/caffe/layers/euclidean_loss_layer.cpp index 43e9989f513..2a814f0150a 100644 --- a/src/caffe/layers/euclidean_loss_layer.cpp +++ b/src/caffe/layers/euclidean_loss_layer.cpp @@ -3,9 +3,9 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" -#include "caffe/util/math_functions.hpp" #include "caffe/util/io.hpp" +#include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/euclidean_loss_layer.cu b/src/caffe/layers/euclidean_loss_layer.cu index b070ea96ff8..e1358f0fb51 100644 --- a/src/caffe/layers/euclidean_loss_layer.cu +++ b/src/caffe/layers/euclidean_loss_layer.cu @@ -3,9 +3,9 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" -#include "caffe/util/math_functions.hpp" #include "caffe/util/io.hpp" +#include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/flatten_layer.cpp b/src/caffe/layers/flatten_layer.cpp index 7e106d26f79..f1fdd322eb4 100644 --- a/src/caffe/layers/flatten_layer.cpp +++ b/src/caffe/layers/flatten_layer.cpp @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/flatten_layer.cu b/src/caffe/layers/flatten_layer.cu index 68add383c48..60b67f06e05 100644 --- a/src/caffe/layers/flatten_layer.cu +++ b/src/caffe/layers/flatten_layer.cu @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/hdf5_data_layer.cpp b/src/caffe/layers/hdf5_data_layer.cpp index 81cfdc096df..38b2b8d23f3 100644 --- a/src/caffe/layers/hdf5_data_layer.cpp +++ b/src/caffe/layers/hdf5_data_layer.cpp @@ -7,13 +7,13 @@ :: don't forget to update hdf5_daa_layer.cu accordingly - add ability to shuffle filenames if flag is set */ -#include +#include // NOLINT(readability/streams) #include #include -#include // NOLINT(readability/streams) #include "hdf5.h" #include "hdf5_hl.h" +#include "stdint.h" #include "caffe/layer.hpp" #include "caffe/util/io.hpp" diff --git a/src/caffe/layers/hinge_loss_layer.cpp b/src/caffe/layers/hinge_loss_layer.cpp index 91fe1534da9..a7ec061eb28 100644 --- a/src/caffe/layers/hinge_loss_layer.cpp +++ b/src/caffe/layers/hinge_loss_layer.cpp @@ -1,14 +1,14 @@ // Copyright 2014 BVLC and contributors. #include -#include #include +#include #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" -#include "caffe/util/math_functions.hpp" #include "caffe/util/io.hpp" +#include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/im2col_layer.cpp b/src/caffe/layers/im2col_layer.cpp index fabce0a6ad6..fb3dad43844 100644 --- a/src/caffe/layers/im2col_layer.cpp +++ b/src/caffe/layers/im2col_layer.cpp @@ -2,10 +2,10 @@ #include +#include "caffe/common.hpp" #include "caffe/layer.hpp" #include "caffe/util/im2col.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/common.hpp" namespace caffe { diff --git a/src/caffe/layers/im2col_layer.cu b/src/caffe/layers/im2col_layer.cu index 84439742250..c9802541aaa 100644 --- a/src/caffe/layers/im2col_layer.cu +++ b/src/caffe/layers/im2col_layer.cu @@ -2,10 +2,10 @@ #include +#include "caffe/common.hpp" #include "caffe/layer.hpp" #include "caffe/util/im2col.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/common.hpp" namespace caffe { diff --git a/src/caffe/layers/image_data_layer.cpp b/src/caffe/layers/image_data_layer.cpp index a0f91af29fa..a10f02c37a8 100644 --- a/src/caffe/layers/image_data_layer.cpp +++ b/src/caffe/layers/image_data_layer.cpp @@ -1,13 +1,10 @@ // Copyright 2014 BVLC and contributors. -#include -#include - -#include -#include -#include // NOLINT(readability/streams) #include // NOLINT(readability/streams) +#include // NOLINT(readability/streams) +#include #include +#include #include "caffe/layer.hpp" #include "caffe/util/io.hpp" diff --git a/src/caffe/layers/image_data_layer.cu b/src/caffe/layers/image_data_layer.cu index fc7e13b338a..8a449d010e2 100644 --- a/src/caffe/layers/image_data_layer.cu +++ b/src/caffe/layers/image_data_layer.cu @@ -1,13 +1,6 @@ // Copyright 2014 BVLC and contributors. -#include -#include -#include - -#include #include -#include // NOLINT(readability/streams) -#include // NOLINT(readability/streams) #include "caffe/blob.hpp" #include "caffe/common.hpp" diff --git a/src/caffe/layers/infogain_loss_layer.cpp b/src/caffe/layers/infogain_loss_layer.cpp index 4b02f4e61db..c972c032607 100644 --- a/src/caffe/layers/infogain_loss_layer.cpp +++ b/src/caffe/layers/infogain_loss_layer.cpp @@ -1,14 +1,14 @@ // Copyright 2014 BVLC and contributors. #include -#include #include +#include #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" -#include "caffe/util/math_functions.hpp" #include "caffe/util/io.hpp" +#include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/inner_product_layer.cpp b/src/caffe/layers/inner_product_layer.cpp index 5505d08587a..6493d0bd497 100644 --- a/src/caffe/layers/inner_product_layer.cpp +++ b/src/caffe/layers/inner_product_layer.cpp @@ -6,8 +6,8 @@ #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/inner_product_layer.cu b/src/caffe/layers/inner_product_layer.cu index 513e4eb7fa8..4b670d644c2 100644 --- a/src/caffe/layers/inner_product_layer.cu +++ b/src/caffe/layers/inner_product_layer.cu @@ -6,8 +6,8 @@ #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/loss_layer.cpp b/src/caffe/layers/loss_layer.cpp index 92eb06f7b0c..656e85a75d8 100644 --- a/src/caffe/layers/loss_layer.cpp +++ b/src/caffe/layers/loss_layer.cpp @@ -1,14 +1,14 @@ // Copyright 2014 BVLC and contributors. #include -#include #include +#include #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" -#include "caffe/util/math_functions.hpp" #include "caffe/util/io.hpp" +#include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/lrn_layer.cpp b/src/caffe/layers/lrn_layer.cpp index 0e2df2ff4bb..50ad6464449 100644 --- a/src/caffe/layers/lrn_layer.cpp +++ b/src/caffe/layers/lrn_layer.cpp @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/lrn_layer.cu b/src/caffe/layers/lrn_layer.cu index 237a42b2860..7a19350549c 100644 --- a/src/caffe/layers/lrn_layer.cu +++ b/src/caffe/layers/lrn_layer.cu @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/multinomial_logistic_loss_layer.cpp b/src/caffe/layers/multinomial_logistic_loss_layer.cpp index beea747c31b..e5eafd65078 100644 --- a/src/caffe/layers/multinomial_logistic_loss_layer.cpp +++ b/src/caffe/layers/multinomial_logistic_loss_layer.cpp @@ -1,14 +1,14 @@ // Copyright 2014 BVLC and contributors. #include -#include #include +#include #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" -#include "caffe/util/math_functions.hpp" #include "caffe/util/io.hpp" +#include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/pooling_layer.cpp b/src/caffe/layers/pooling_layer.cpp index 9415a15a094..75a74dac9ec 100644 --- a/src/caffe/layers/pooling_layer.cpp +++ b/src/caffe/layers/pooling_layer.cpp @@ -6,9 +6,9 @@ #include "caffe/common.hpp" #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/syncedmem.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/pooling_layer.cu b/src/caffe/layers/pooling_layer.cu index efa1aaa2ab1..6f3a7205091 100644 --- a/src/caffe/layers/pooling_layer.cu +++ b/src/caffe/layers/pooling_layer.cu @@ -5,8 +5,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/power_layer.cpp b/src/caffe/layers/power_layer.cpp index 55ace207b7a..86cb3d76291 100644 --- a/src/caffe/layers/power_layer.cpp +++ b/src/caffe/layers/power_layer.cpp @@ -4,8 +4,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/power_layer.cu b/src/caffe/layers/power_layer.cu index 0aa00272eea..db88fee8f3b 100644 --- a/src/caffe/layers/power_layer.cu +++ b/src/caffe/layers/power_layer.cu @@ -4,8 +4,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp b/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp index 31522dd1fe6..2bf931d004b 100644 --- a/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp +++ b/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp @@ -5,8 +5,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cu b/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cu index 1d1f8cd51ff..698ec1dbde1 100644 --- a/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cu +++ b/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cu @@ -5,8 +5,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/slice_layer.cpp b/src/caffe/layers/slice_layer.cpp index e8231e357d9..fc86a2d4307 100644 --- a/src/caffe/layers/slice_layer.cpp +++ b/src/caffe/layers/slice_layer.cpp @@ -1,11 +1,11 @@ // Copyright 2014 BVLC and contributors. -#include #include +#include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/slice_layer.cu b/src/caffe/layers/slice_layer.cu index 3ea8d57659d..70702148f5d 100644 --- a/src/caffe/layers/slice_layer.cu +++ b/src/caffe/layers/slice_layer.cu @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/softmax_layer.cpp b/src/caffe/layers/softmax_layer.cpp index 0de1403585a..6a98b320208 100644 --- a/src/caffe/layers/softmax_layer.cpp +++ b/src/caffe/layers/softmax_layer.cpp @@ -4,8 +4,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/softmax_layer.cu b/src/caffe/layers/softmax_layer.cu index d471ba51cd0..6d65fbce957 100644 --- a/src/caffe/layers/softmax_layer.cu +++ b/src/caffe/layers/softmax_layer.cu @@ -7,8 +7,8 @@ #include "thrust/device_vector.h" #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/softmax_loss_layer.cpp b/src/caffe/layers/softmax_loss_layer.cpp index 4e957cee9b4..43e8fcac44c 100644 --- a/src/caffe/layers/softmax_loss_layer.cpp +++ b/src/caffe/layers/softmax_loss_layer.cpp @@ -5,8 +5,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/softmax_loss_layer.cu b/src/caffe/layers/softmax_loss_layer.cu index ae7060d90bd..f55b8c7adf3 100644 --- a/src/caffe/layers/softmax_loss_layer.cu +++ b/src/caffe/layers/softmax_loss_layer.cu @@ -5,8 +5,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/split_layer.cpp b/src/caffe/layers/split_layer.cpp index 6bae4ef22fb..d13b8d12358 100644 --- a/src/caffe/layers/split_layer.cpp +++ b/src/caffe/layers/split_layer.cpp @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/split_layer.cu b/src/caffe/layers/split_layer.cu index 4c921d39f17..a89c5d61883 100644 --- a/src/caffe/layers/split_layer.cu +++ b/src/caffe/layers/split_layer.cu @@ -3,8 +3,8 @@ #include #include "caffe/layer.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" +#include "caffe/vision_layers.hpp" namespace caffe { diff --git a/src/caffe/layers/window_data_layer.cpp b/src/caffe/layers/window_data_layer.cpp index fe7f61c91df..cbd269685ce 100644 --- a/src/caffe/layers/window_data_layer.cpp +++ b/src/caffe/layers/window_data_layer.cpp @@ -5,11 +5,11 @@ #include #include -#include -#include -#include #include // NOLINT(readability/streams) +#include +#include #include +#include #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" diff --git a/src/caffe/layers/window_data_layer.cu b/src/caffe/layers/window_data_layer.cu index d95e5b20e88..5efcc3f4adc 100644 --- a/src/caffe/layers/window_data_layer.cu +++ b/src/caffe/layers/window_data_layer.cu @@ -2,8 +2,8 @@ // // Based on data_layer.cpp by Yangqing Jia. -#include #include +#include #include #include diff --git a/src/caffe/net.cpp b/src/caffe/net.cpp index b80bbba8479..6fab0e3a6b4 100644 --- a/src/caffe/net.cpp +++ b/src/caffe/net.cpp @@ -7,14 +7,15 @@ #include #include "caffe/common.hpp" -#include "caffe/proto/caffe.pb.h" #include "caffe/layer.hpp" #include "caffe/net.hpp" -#include "caffe/util/io.hpp" +#include "caffe/proto/caffe.pb.h" #include "caffe/util/insert_splits.hpp" +#include "caffe/util/io.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/util/upgrade_proto.hpp" +#include "caffe/test/test_caffe_main.hpp" namespace caffe { diff --git a/src/caffe/test/test_accuracy_layer.cpp b/src/caffe/test/test_accuracy_layer.cpp index 5023a809d17..95217df3f1f 100644 --- a/src/caffe/test/test_accuracy_layer.cpp +++ b/src/caffe/test/test_accuracy_layer.cpp @@ -1,11 +1,12 @@ // Copyright 2014 BVLC and contributors. +#include #include #include -#include #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" diff --git a/src/caffe/test/test_argmax_layer.cpp b/src/caffe/test/test_argmax_layer.cpp index 51d68c42f9a..3f55edaac22 100644 --- a/src/caffe/test/test_argmax_layer.cpp +++ b/src/caffe/test/test_argmax_layer.cpp @@ -4,11 +4,11 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" diff --git a/src/caffe/test/test_benchmark.cpp b/src/caffe/test/test_benchmark.cpp index fe0cc82a1d8..e6d9ebf9a05 100644 --- a/src/caffe/test/test_benchmark.cpp +++ b/src/caffe/test/test_benchmark.cpp @@ -1,10 +1,12 @@ // Copyright 2014 BVLC and contributors. #include // for usleep -#include + +#include "gtest/gtest.h" #include "caffe/common.hpp" #include "caffe/util/benchmark.hpp" + #include "caffe/test/test_caffe_main.hpp" namespace caffe { diff --git a/src/caffe/test/test_blob.cpp b/src/caffe/test/test_blob.cpp index aec88f322e6..89f4a161c9c 100644 --- a/src/caffe/test/test_blob.cpp +++ b/src/caffe/test/test_blob.cpp @@ -3,8 +3,9 @@ #include #include "gtest/gtest.h" -#include "caffe/common.hpp" + #include "caffe/blob.hpp" +#include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/test/test_caffe_main.hpp" diff --git a/src/caffe/test/test_common.cpp b/src/caffe/test/test_common.cpp index a8e2eb15270..455f5d8a32d 100644 --- a/src/caffe/test/test_common.cpp +++ b/src/caffe/test/test_common.cpp @@ -3,9 +3,11 @@ #include #include "gtest/gtest.h" + #include "caffe/common.hpp" #include "caffe/syncedmem.hpp" #include "caffe/util/math_functions.hpp" + #include "caffe/test/test_caffe_main.hpp" namespace caffe { diff --git a/src/caffe/test/test_concat_layer.cpp b/src/caffe/test/test_concat_layer.cpp index 4cb28b1e24e..b07c5727a79 100644 --- a/src/caffe/test/test_concat_layer.cpp +++ b/src/caffe/test/test_concat_layer.cpp @@ -4,13 +4,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_convolution_layer.cpp b/src/caffe/test/test_convolution_layer.cpp index f3cfb680990..41951cfb940 100644 --- a/src/caffe/test/test_convolution_layer.cpp +++ b/src/caffe/test/test_convolution_layer.cpp @@ -4,13 +4,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_data_layer.cpp b/src/caffe/test/test_data_layer.cpp index ed7337c5eca..be478b2746c 100644 --- a/src/caffe/test/test_data_layer.cpp +++ b/src/caffe/test/test_data_layer.cpp @@ -4,12 +4,15 @@ #include #include "leveldb/db.h" + #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/proto/caffe.pb.h" +#include "caffe/vision_layers.hpp" + #include "caffe/test/test_caffe_main.hpp" using std::string; diff --git a/src/caffe/test/test_dummy_data_layer.cpp b/src/caffe/test/test_dummy_data_layer.cpp index 5b5f2025737..aa6cc55364e 100644 --- a/src/caffe/test/test_dummy_data_layer.cpp +++ b/src/caffe/test/test_dummy_data_layer.cpp @@ -4,10 +4,12 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/proto/caffe.pb.h" +#include "caffe/vision_layers.hpp" + #include "caffe/test/test_caffe_main.hpp" using std::string; diff --git a/src/caffe/test/test_eltwise_layer.cpp b/src/caffe/test/test_eltwise_layer.cpp index 53bff96ed6d..fe3269bb3a2 100644 --- a/src/caffe/test/test_eltwise_layer.cpp +++ b/src/caffe/test/test_eltwise_layer.cpp @@ -3,13 +3,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_euclidean_loss_layer.cpp b/src/caffe/test/test_euclidean_loss_layer.cpp index dd27670da13..6dd631e55e8 100644 --- a/src/caffe/test/test_euclidean_loss_layer.cpp +++ b/src/caffe/test/test_euclidean_loss_layer.cpp @@ -6,13 +6,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_filler.cpp b/src/caffe/test/test_filler.cpp index 1b145f2418e..d0d750fff47 100644 --- a/src/caffe/test/test_filler.cpp +++ b/src/caffe/test/test_filler.cpp @@ -3,6 +3,7 @@ #include #include "gtest/gtest.h" + #include "caffe/filler.hpp" #include "caffe/test/test_caffe_main.hpp" diff --git a/src/caffe/test/test_flatten_layer.cpp b/src/caffe/test/test_flatten_layer.cpp index bea099b1f92..928db849296 100644 --- a/src/caffe/test/test_flatten_layer.cpp +++ b/src/caffe/test/test_flatten_layer.cpp @@ -4,13 +4,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_hdf5_output_layer.cpp b/src/caffe/test/test_hdf5_output_layer.cpp index ec48fc4fc32..a36a8cbd9a8 100644 --- a/src/caffe/test/test_hdf5_output_layer.cpp +++ b/src/caffe/test/test_hdf5_output_layer.cpp @@ -4,11 +4,13 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" +#include "caffe/proto/caffe.pb.h" #include "caffe/util/io.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/proto/caffe.pb.h" + #include "caffe/test/test_caffe_main.hpp" using std::string; diff --git a/src/caffe/test/test_hdf5data_layer.cpp b/src/caffe/test/test_hdf5data_layer.cpp index f3d7c8c6974..1f3bf9f3cd0 100644 --- a/src/caffe/test/test_hdf5data_layer.cpp +++ b/src/caffe/test/test_hdf5data_layer.cpp @@ -6,11 +6,13 @@ #include "leveldb/db.h" #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/proto/caffe.pb.h" +#include "caffe/vision_layers.hpp" + #include "caffe/test/test_caffe_main.hpp" using std::string; diff --git a/src/caffe/test/test_hinge_loss_layer.cpp b/src/caffe/test/test_hinge_loss_layer.cpp index 84374e9579a..c6be1d73262 100644 --- a/src/caffe/test/test_hinge_loss_layer.cpp +++ b/src/caffe/test/test_hinge_loss_layer.cpp @@ -6,13 +6,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_im2col_kernel.cu b/src/caffe/test/test_im2col_kernel.cu index 37d1a1523af..89008ac7e39 100644 --- a/src/caffe/test/test_im2col_kernel.cu +++ b/src/caffe/test/test_im2col_kernel.cu @@ -4,11 +4,12 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/util/im2col.hpp" +#include "caffe/vision_layers.hpp" #include "caffe/test/test_caffe_main.hpp" diff --git a/src/caffe/test/test_im2col_layer.cpp b/src/caffe/test/test_im2col_layer.cpp index aaee3d81bf7..6884b059fde 100644 --- a/src/caffe/test/test_im2col_layer.cpp +++ b/src/caffe/test/test_im2col_layer.cpp @@ -4,13 +4,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_image_data_layer.cpp b/src/caffe/test/test_image_data_layer.cpp index ae9a2dbc17d..bbeedb8dce5 100644 --- a/src/caffe/test/test_image_data_layer.cpp +++ b/src/caffe/test/test_image_data_layer.cpp @@ -1,17 +1,19 @@ // Copyright 2014 BVLC and contributors. -#include // NOLINT(readability/streams) #include // NOLINT(readability/streams) +#include // NOLINT(readability/streams) #include #include #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/proto/caffe.pb.h" +#include "caffe/vision_layers.hpp" + #include "caffe/test/test_caffe_main.hpp" using std::map; diff --git a/src/caffe/test/test_infogain_loss_layer.cpp b/src/caffe/test/test_infogain_loss_layer.cpp index 99bad263e88..7b3705084a5 100644 --- a/src/caffe/test/test_infogain_loss_layer.cpp +++ b/src/caffe/test/test_infogain_loss_layer.cpp @@ -6,13 +6,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/loss_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_inner_product_layer.cpp b/src/caffe/test/test_inner_product_layer.cpp index de194f2d63f..31d87afc7ce 100644 --- a/src/caffe/test/test_inner_product_layer.cpp +++ b/src/caffe/test/test_inner_product_layer.cpp @@ -4,13 +4,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_lrn_layer.cpp b/src/caffe/test/test_lrn_layer.cpp index 5bd5533f955..fbb03dfecb5 100644 --- a/src/caffe/test/test_lrn_layer.cpp +++ b/src/caffe/test/test_lrn_layer.cpp @@ -5,13 +5,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" using std::min; using std::max; diff --git a/src/caffe/test/test_math_functions.cpp b/src/caffe/test/test_math_functions.cpp index 502b77e07a8..c89ca027adf 100644 --- a/src/caffe/test/test_math_functions.cpp +++ b/src/caffe/test/test_math_functions.cpp @@ -7,6 +7,7 @@ #include // for rand_r #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" diff --git a/src/caffe/test/test_maxpool_dropout_layers.cpp b/src/caffe/test/test_maxpool_dropout_layers.cpp index 733bbf4ad1f..e939d0c6e11 100644 --- a/src/caffe/test/test_maxpool_dropout_layers.cpp +++ b/src/caffe/test/test_maxpool_dropout_layers.cpp @@ -4,13 +4,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_memory_data_layer.cpp b/src/caffe/test/test_memory_data_layer.cpp index c9d588986c2..60e75ebbc1a 100644 --- a/src/caffe/test/test_memory_data_layer.cpp +++ b/src/caffe/test/test_memory_data_layer.cpp @@ -4,6 +4,7 @@ #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" + #include "caffe/test/test_caffe_main.hpp" namespace caffe { diff --git a/src/caffe/test/test_multinomial_logistic_loss_layer.cpp b/src/caffe/test/test_multinomial_logistic_loss_layer.cpp index ec53d40e53e..9b6bb067805 100644 --- a/src/caffe/test/test_multinomial_logistic_loss_layer.cpp +++ b/src/caffe/test/test_multinomial_logistic_loss_layer.cpp @@ -6,13 +6,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_net.cpp b/src/caffe/test/test_net.cpp index a0a387929be..6787ba956ec 100644 --- a/src/caffe/test/test_net.cpp +++ b/src/caffe/test/test_net.cpp @@ -7,14 +7,13 @@ #include "google/protobuf/text_format.h" #include "gtest/gtest.h" + #include "caffe/common.hpp" #include "caffe/net.hpp" #include "caffe/util/math_functions.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" - -using std::ostringstream; +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_neuron_layer.cpp b/src/caffe/test/test_neuron_layer.cpp index b3a536a7bfd..59c9b3d34f5 100644 --- a/src/caffe/test/test_neuron_layer.cpp +++ b/src/caffe/test/test_neuron_layer.cpp @@ -4,13 +4,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_platform.cpp b/src/caffe/test/test_platform.cpp index e1c4dafc7bb..a4f4b4260c4 100644 --- a/src/caffe/test/test_platform.cpp +++ b/src/caffe/test/test_platform.cpp @@ -2,11 +2,12 @@ #ifndef CPU_ONLY -#include #include +#include #include "glog/logging.h" #include "gtest/gtest.h" + #include "caffe/test/test_caffe_main.hpp" namespace caffe { diff --git a/src/caffe/test/test_pooling_layer.cpp b/src/caffe/test/test_pooling_layer.cpp index b9cec54af39..4636dd773a4 100644 --- a/src/caffe/test/test_pooling_layer.cpp +++ b/src/caffe/test/test_pooling_layer.cpp @@ -4,13 +4,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_power_layer.cpp b/src/caffe/test/test_power_layer.cpp index 44fcbd9117c..e35d539b776 100644 --- a/src/caffe/test/test_power_layer.cpp +++ b/src/caffe/test/test_power_layer.cpp @@ -9,9 +9,9 @@ #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_protobuf.cpp b/src/caffe/test/test_protobuf.cpp index 182af2e4611..da1a0d3f5eb 100644 --- a/src/caffe/test/test_protobuf.cpp +++ b/src/caffe/test/test_protobuf.cpp @@ -6,9 +6,11 @@ #include "google/protobuf/text_format.h" #include "gtest/gtest.h" -#include "caffe/test/test_caffe_main.hpp" + #include "caffe/proto/caffe.pb.h" +#include "caffe/test/test_caffe_main.hpp" + namespace caffe { class ProtoTest : public ::testing::Test {}; diff --git a/src/caffe/test/test_random_number_generator.cpp b/src/caffe/test/test_random_number_generator.cpp index abe21c2523e..8e3919157af 100644 --- a/src/caffe/test/test_random_number_generator.cpp +++ b/src/caffe/test/test_random_number_generator.cpp @@ -4,9 +4,11 @@ #include #include "gtest/gtest.h" + #include "caffe/common.hpp" #include "caffe/syncedmem.hpp" #include "caffe/util/math_functions.hpp" + #include "caffe/test/test_caffe_main.hpp" namespace caffe { diff --git a/src/caffe/test/test_sgd_solver.cpp b/src/caffe/test/test_sgd_solver.cpp index a28ed7b1817..14dcac25e8e 100644 --- a/src/caffe/test/test_sgd_solver.cpp +++ b/src/caffe/test/test_sgd_solver.cpp @@ -8,6 +8,7 @@ #include "google/protobuf/text_format.h" #include "gtest/gtest.h" + #include "caffe/common.hpp" #include "caffe/proto/caffe.pb.h" #include "caffe/solver.hpp" diff --git a/src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp b/src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp index a5388db092f..7205ce9311b 100644 --- a/src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp +++ b/src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp @@ -6,13 +6,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_slice_layer.cpp b/src/caffe/test/test_slice_layer.cpp index 59f6a8d4c66..e61f3e4f2c9 100644 --- a/src/caffe/test/test_slice_layer.cpp +++ b/src/caffe/test/test_slice_layer.cpp @@ -4,13 +4,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_softmax_layer.cpp b/src/caffe/test/test_softmax_layer.cpp index fa899f92db3..a305c647585 100644 --- a/src/caffe/test/test_softmax_layer.cpp +++ b/src/caffe/test/test_softmax_layer.cpp @@ -5,13 +5,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_softmax_with_loss_layer.cpp b/src/caffe/test/test_softmax_with_loss_layer.cpp index 6f45c3889c2..2994a9117af 100644 --- a/src/caffe/test/test_softmax_with_loss_layer.cpp +++ b/src/caffe/test/test_softmax_with_loss_layer.cpp @@ -6,13 +6,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_solver.cpp b/src/caffe/test/test_solver.cpp index feefb51210a..133d01c5446 100644 --- a/src/caffe/test/test_solver.cpp +++ b/src/caffe/test/test_solver.cpp @@ -5,8 +5,8 @@ #include #include "google/protobuf/text_format.h" - #include "gtest/gtest.h" + #include "caffe/common.hpp" #include "caffe/proto/caffe.pb.h" #include "caffe/solver.hpp" diff --git a/src/caffe/test/test_split_layer.cpp b/src/caffe/test/test_split_layer.cpp index bbee6d28855..a4e5857877e 100644 --- a/src/caffe/test/test_split_layer.cpp +++ b/src/caffe/test/test_split_layer.cpp @@ -6,14 +6,15 @@ #include "google/protobuf/text_format.h" #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" -#include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/util/insert_splits.hpp" +#include "caffe/vision_layers.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_stochastic_pooling.cpp b/src/caffe/test/test_stochastic_pooling.cpp index 66e9b2d7d88..600b909a638 100644 --- a/src/caffe/test/test_stochastic_pooling.cpp +++ b/src/caffe/test/test_stochastic_pooling.cpp @@ -5,13 +5,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" using std::min; diff --git a/src/caffe/test/test_syncedmem.cpp b/src/caffe/test/test_syncedmem.cpp index f07682a2aa5..5ccc480112d 100644 --- a/src/caffe/test/test_syncedmem.cpp +++ b/src/caffe/test/test_syncedmem.cpp @@ -4,6 +4,7 @@ #include #include "gtest/gtest.h" + #include "caffe/common.hpp" #include "caffe/syncedmem.hpp" #include "caffe/util/device_alternate.hpp" diff --git a/src/caffe/test/test_tanh_layer.cpp b/src/caffe/test/test_tanh_layer.cpp index 7fc443f6d6d..1dac5a57043 100644 --- a/src/caffe/test/test_tanh_layer.cpp +++ b/src/caffe/test/test_tanh_layer.cpp @@ -6,13 +6,14 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" +#include "caffe/test/test_gradient_check_util.hpp" namespace caffe { diff --git a/src/caffe/test/test_threshold_layer.cpp b/src/caffe/test/test_threshold_layer.cpp index 7006dd11880..b06d697ab0b 100644 --- a/src/caffe/test/test_threshold_layer.cpp +++ b/src/caffe/test/test_threshold_layer.cpp @@ -3,11 +3,11 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/vision_layers.hpp" -#include "caffe/test/test_gradient_check_util.hpp" #include "caffe/test/test_caffe_main.hpp" diff --git a/src/caffe/test/test_upgrade_proto.cpp b/src/caffe/test/test_upgrade_proto.cpp index 72ee838931d..a16b835f864 100644 --- a/src/caffe/test/test_upgrade_proto.cpp +++ b/src/caffe/test/test_upgrade_proto.cpp @@ -6,6 +6,7 @@ #include "google/protobuf/text_format.h" #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/util/upgrade_proto.hpp" diff --git a/src/caffe/test/test_util_blas.cpp b/src/caffe/test/test_util_blas.cpp index d74f9f017ee..841edefc66c 100644 --- a/src/caffe/test/test_util_blas.cpp +++ b/src/caffe/test/test_util_blas.cpp @@ -5,6 +5,7 @@ #include #include "gtest/gtest.h" + #include "caffe/blob.hpp" #include "caffe/util/device_alternate.hpp" #include "caffe/util/math_functions.hpp" diff --git a/src/caffe/util/insert_splits.cpp b/src/caffe/util/insert_splits.cpp index 4de546810e5..b88b320ff3d 100644 --- a/src/caffe/util/insert_splits.cpp +++ b/src/caffe/util/insert_splits.cpp @@ -1,8 +1,8 @@ // Copyright 2014 BVLC and contributors. #include -#include #include +#include #include #include "caffe/common.hpp" diff --git a/src/caffe/util/io.cpp b/src/caffe/util/io.cpp index 4f200474459..575ea3d63c2 100644 --- a/src/caffe/util/io.cpp +++ b/src/caffe/util/io.cpp @@ -1,23 +1,23 @@ // Copyright 2014 BVLC and contributors. -#include #include -#include -#include #include +#include +#include #include #include #include #include +#include #include +#include // NOLINT(readability/streams) #include #include -#include // NOLINT(readability/streams) #include "caffe/common.hpp" -#include "caffe/util/io.hpp" #include "caffe/proto/caffe.pb.h" +#include "caffe/util/io.hpp" namespace caffe { diff --git a/src/caffe/util/upgrade_proto.cpp b/src/caffe/util/upgrade_proto.cpp index e1a48f194e1..a6e9c404df7 100644 --- a/src/caffe/util/upgrade_proto.cpp +++ b/src/caffe/util/upgrade_proto.cpp @@ -1,16 +1,16 @@ // Copyright 2014 BVLC and contributors. -#include -#include #include +#include +#include #include #include #include "caffe/common.hpp" +#include "caffe/proto/caffe.pb.h" #include "caffe/util/io.hpp" #include "caffe/util/upgrade_proto.hpp" -#include "caffe/proto/caffe.pb.h" namespace caffe { diff --git a/tools/dump_network.cpp b/tools/dump_network.cpp index c5aac604079..8984016916a 100644 --- a/tools/dump_network.cpp +++ b/tools/dump_network.cpp @@ -18,11 +18,11 @@ #include "caffe/blob.hpp" #include "caffe/common.hpp" -#include "caffe/net.hpp" #include "caffe/filler.hpp" +#include "caffe/net.hpp" #include "caffe/proto/caffe.pb.h" -#include "caffe/util/io.hpp" #include "caffe/solver.hpp" +#include "caffe/util/io.hpp" using namespace caffe; // NOLINT(build/namespaces) diff --git a/tools/extract_features.cpp b/tools/extract_features.cpp index 22b0e61e227..06e07fe6cba 100644 --- a/tools/extract_features.cpp +++ b/tools/extract_features.cpp @@ -1,19 +1,20 @@ // Copyright 2014 BVLC and contributors. #include // for snprintf -#include -#include -#include -#include #include #include +#include "boost/algorithm/string.hpp" +#include "google/protobuf/text_format.h" +#include "leveldb/db.h" +#include "leveldb/write_batch.h" + #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/net.hpp" -#include "caffe/vision_layers.hpp" #include "caffe/proto/caffe.pb.h" #include "caffe/util/io.hpp" +#include "caffe/vision_layers.hpp" using namespace caffe; // NOLINT(build/namespaces) diff --git a/tools/test_net.cpp b/tools/test_net.cpp index 9d37536c758..b6f827e6285 100644 --- a/tools/test_net.cpp +++ b/tools/test_net.cpp @@ -6,8 +6,8 @@ // Usage: // test_net net_proto pretrained_net_proto iterations [CPU/GPU] -#include #include +#include #include #include "caffe/caffe.hpp" diff --git a/tools/upgrade_net_proto_binary.cpp b/tools/upgrade_net_proto_binary.cpp index 928fc52dc27..ed703f027cd 100644 --- a/tools/upgrade_net_proto_binary.cpp +++ b/tools/upgrade_net_proto_binary.cpp @@ -5,8 +5,8 @@ // upgrade_net_proto_binary v0_net_proto_file_in net_proto_file_out #include -#include // NOLINT(readability/streams) #include // NOLINT(readability/streams) +#include // NOLINT(readability/streams) #include "caffe/caffe.hpp" #include "caffe/util/io.hpp" diff --git a/tools/upgrade_net_proto_text.cpp b/tools/upgrade_net_proto_text.cpp index 8a77f752cc2..d05d1ac5883 100644 --- a/tools/upgrade_net_proto_text.cpp +++ b/tools/upgrade_net_proto_text.cpp @@ -5,8 +5,8 @@ // upgrade_net_proto_text v0_net_proto_file_in net_proto_file_out #include -#include // NOLINT(readability/streams) #include // NOLINT(readability/streams) +#include // NOLINT(readability/streams) #include "caffe/caffe.hpp" #include "caffe/util/io.hpp"