-// Copyright 2014 BVLC and contributors.
//
// This script converts the CIFAR dataset to the leveldb format used
// by caffe to perform classification.
-// Copyright 2014 BVLC and contributors.
//
// This script converts the MNIST dataset to the leveldb format used
// by caffe to perform classification.
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_BLOB_HPP_
#define CAFFE_BLOB_HPP_
-// 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.
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_COMMON_HPP_
#define CAFFE_COMMON_HPP_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_COMMON_LAYERS_HPP_
#define CAFFE_COMMON_LAYERS_HPP_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_DATA_LAYERS_HPP_
#define CAFFE_DATA_LAYERS_HPP_
-// 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.
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_INTERNAL_THREAD_HPP_
#define CAFFE_INTERNAL_THREAD_HPP_
}
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;
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_LAYER_H_
#define CAFFE_LAYER_H_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_LOSS_LAYERS_HPP_
#define CAFFE_LOSS_LAYERS_HPP_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_NET_HPP_
#define CAFFE_NET_HPP_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_NEURON_LAYERS_HPP_
#define CAFFE_NEURON_LAYERS_HPP_
/* 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>
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_OPTIMIZATION_SOLVER_HPP_
#define CAFFE_OPTIMIZATION_SOLVER_HPP_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_SYNCEDMEM_HPP_
#define CAFFE_SYNCEDMEM_HPP_
-// 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_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_TEST_GRADIENT_CHECK_UTIL_H_
#define CAFFE_TEST_GRADIENT_CHECK_UTIL_H_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_UTIL_BENCHMARK_H_
#define CAFFE_UTIL_BENCHMARK_H_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_UTIL_DEVICE_ALTERNATE_H_
#define CAFFE_UTIL_DEVICE_ALTERNATE_H_
-// Copyright 2014 BVLC and contributors.
-
#ifndef _CAFFE_UTIL_IM2COL_HPP_
#define _CAFFE_UTIL_IM2COL_HPP_
-// Copyright 2014 BVLC and contributors.
-
#ifndef _CAFFE_UTIL_INSERT_SPLITS_HPP_
#define _CAFFE_UTIL_INSERT_SPLITS_HPP_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_UTIL_IO_H_
#define CAFFE_UTIL_IO_H_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_UTIL_MATH_FUNCTIONS_H_
#define CAFFE_UTIL_MATH_FUNCTIONS_H_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_UTIL_MKL_ALTERNATE_H_
#define CAFFE_UTIL_MKL_ALTERNATE_H_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_RNG_CPP_HPP_
#define CAFFE_RNG_CPP_HPP_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_UTIL_UPGRADE_PROTO_H_
#define CAFFE_UTIL_UPGRADE_PROTO_H_
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_VISION_LAYERS_HPP_
#define CAFFE_VISION_LAYERS_HPP_
-// 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.
-// 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.
-// Copyright 2014 BVLC and contributors.
-
#include "caffe/blob.hpp"
#include "caffe/common.hpp"
#include "caffe/syncedmem.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <cstdio>
-// Copyright 2014 BVLC and contributors.
-
#ifndef CAFFE_LAYER_FACTORY_HPP_
#define CAFFE_LAYER_FACTORY_HPP_
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <functional>
#include <utility>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <functional>
#include <utility>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/filler.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/filler.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <leveldb/db.h>
#include <stdint.h>
-// Copyright 2014 BVLC and contributors.
-
#include <string>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
// TODO (sergeyk): effect should not be dependent on phase. wasted memcpy.
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <limits>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/filler.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
/*
TODO:
- load file in a separate thread ("prefetch")
-// Copyright 2014 BVLC and contributors.
/*
TODO:
- only load parts of the file, in accordance with a prototxt param "max_mem"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "hdf5.h"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "hdf5.h"
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <cmath>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/common.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/common.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <fstream> // NOLINT(readability/streams)
#include <iostream> // NOLINT(readability/streams)
#include <string>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/blob.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <cmath>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/blob.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/blob.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <cmath>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <cmath>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cmath>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cmath>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
//
#include <algorithm>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cfloat>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
// TanH neuron activation function layer.
// Adapted from ReLU layer code written by Yangqing Jia
-// Copyright 2014 BVLC and contributors.
// TanH neuron activation function layer.
// Adapted from ReLU layer code written by Yangqing Jia
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/layer.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <vector>
-// Copyright 2014 BVLC and contributors.
//
// Based on data_layer.cpp by Yangqing Jia.
-// Copyright 2014 BVLC and contributors.
//
// Based on data_layer.cpp by Yangqing Jia.
-// Copyright 2014 BVLC and contributors.
-
#include <map>
#include <set>
#include <string>
-// Copyright 2014 BVLC and contributors.
-
syntax = "proto2";
package caffe;
-// Copyright 2014 BVLC and contributors.
-
syntax = "proto2";
package caffe;
-// Copyright 2014 BVLC and contributors.
-
#include <cstdio>
#include <algorithm>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include "caffe/common.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <cfloat>
#include <cmath>
#include <cstring>
-// Copyright 2014 BVLC and contributors.
-
#include <utility>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <unistd.h> // for usleep
#include "gtest/gtest.h"
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include "gtest/gtest.h"
-// 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.
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include "gtest/gtest.h"
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <string>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <string>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "gtest/gtest.h"
-// Copyright 2014 BVLC and contributors.
-
#include <cmath>
#include <cstdlib>
#include <cstring>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include "gtest/gtest.h"
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <string>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <string>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <cmath>
#include <cstdlib>
#include <cstring>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <fstream> // NOLINT(readability/streams)
#include <iostream> // NOLINT(readability/streams)
#include <map>
-// Copyright 2014 BVLC and contributors.
-
#include <cmath>
#include <cstdlib>
#include <cstring>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <stdint.h> // for uint32_t & uint64_t
#include <time.h>
#include <climits>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "caffe/filler.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <cmath>
#include <cstdlib>
#include <cstring>
-// Copyright 2014 BVLC and contributors.
-
#include <string>
#include <utility>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#ifndef CPU_ONLY
#include <cstdio>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
// This is simply a script that tries serializing protocol buffer in text
// format. Nothing special here and no actual code is being tested.
#include <string>
-// Copyright 2014 BVLC and contributors.
-
#include <cmath>
#include <cstring>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <string>
#include <utility>
-// Copyright 2014 BVLC and contributors.
-
#include <cmath>
#include <cstdlib>
#include <cstring>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <cmath>
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <cmath>
#include <cstdlib>
#include <cstring>
-// Copyright 2014 BVLC and contributors.
-
#include <string>
#include <utility>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <string>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <vector>
-// Copyright 2014 BVLC and contributors.
// Adapted from other test files
#include <cmath>
-// Copyright 2014 BVLC and contributors.
-
#include <vector>
#include "gtest/gtest.h"
-// Copyright 2014 BVLC and contributors.
-
#include <cstring>
#include <string>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#ifndef CPU_ONLY // CPU-GPU test
#include <cstring>
-// Copyright 2014 BVLC and contributors.
-
#include <boost/date_time/posix_time/posix_time.hpp>
#include "caffe/common.hpp"
-// Copyright 2014 BVLC and contributors.
-
#include <cmath>
#include <cstdlib>
#include <cstring>
-// Copyright 2014 BVLC and contributors.
-
#include <algorithm>
#include <cmath>
#include <cstdlib>
-// Copyright 2014 BVLC and contributors.
-
#include <map>
#include <sstream>
#include <string>
-// Copyright 2014 BVLC and contributors.
-
#include <fcntl.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
-// Copyright 2014 BVLC and contributors.
-
#include <boost/math/special_functions/next.hpp>
#include <boost/random.hpp>
-// Copyright 2014 BVLC and contributors.
-
#include <math_functions.h> // CUDA's, not caffe's, for fabs, signbit
#include <thrust/device_vector.h>
#include <thrust/functional.h> // thrust::plus
-// Copyright 2014 BVLC and contributors.
-
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/text_format.h>
-// Copyright 2014 BVLC and contributors.
#include <gflags/gflags.h>
#include <glog/logging.h>
-// Copyright 2014 BVLC and contributors.
-
#include <glog/logging.h>
#include <leveldb/db.h>
#include <lmdb.h>
-// Copyright 2014 BVLC and contributors.
// This program converts a set of images to a leveldb by storing them as Datum
// proto buffers.
// Usage:
-// Copyright 2014 BVLC and contributors.
-
#include "caffe/common.hpp"
int main(int argc, char** argv) {
-// Copyright 2014 BVLC and contributors.
-//
// This program takes in a trained network and an input blob, and then dumps
// all the intermediate blobs produced by the net to individual binary
// files stored in protobuffer binary formats.
-// Copyright 2014 BVLC and contributors.
-
#include <stdio.h> // for snprintf
#include <string>
#include <vector>
-// Copyright 2014 BVLC and contributors.
-
#include "caffe/caffe.hpp"
int main(int argc, char** argv) {
-// Copyright 2014 BVLC and contributors.
-
#include "caffe/caffe.hpp"
int main(int argc, char** argv) {
-// Copyright 2014 BVLC and contributors.
-//
// This is a simple script that allows one to quickly test a network whose
// structure is specified by text format protocol buffers, and whose parameter
// are loaded from a pre-trained network.
-// Copyright 2014 BVLC and contributors.
-
#include "caffe/caffe.hpp"
int main(int argc, char** argv) {
-// Copyright 2014 BVLC and contributors.
-//
// This is a script to upgrade "V0" network prototxts to the new format.
// Usage:
// upgrade_net_proto_binary v0_net_proto_file_in net_proto_file_out
-// Copyright 2014 BVLC and contributors.
-//
// This is a script to upgrade "V0" network prototxts to the new format.
// Usage:
// upgrade_net_proto_text v0_net_proto_file_in net_proto_file_out