From b7444d63e2e3f0328527fe084b24c984f8ea3f59 Mon Sep 17 00:00:00 2001 From: Jeff Donahue Date: Thu, 27 Mar 2014 12:34:40 -0700 Subject: [PATCH] some post rebase fixes -- copyright, hdf5_output layer (still need to incorporate into util/upgrade_proto) --- include/caffe/util/upgrade_proto.hpp | 2 +- src/caffe/layers/image_data_layer.cu | 6 ++-- src/caffe/proto/caffe.proto | 51 ++++++++++++++------------- src/caffe/test/test_upgrade_proto.cpp | 2 +- src/caffe/util/upgrade_proto.cpp | 2 +- tools/upgrade_net_proto.cpp | 2 +- 6 files changed, 34 insertions(+), 31 deletions(-) diff --git a/include/caffe/util/upgrade_proto.hpp b/include/caffe/util/upgrade_proto.hpp index 18b00684..bcf2d601 100644 --- a/include/caffe/util/upgrade_proto.hpp +++ b/include/caffe/util/upgrade_proto.hpp @@ -1,4 +1,4 @@ -// Copyright 2014 Jeff Donahue +// Copyright 2014 BVLC and contributors. #ifndef CAFFE_UTIL_UPGRADE_PROTO_H_ #define CAFFE_UTIL_UPGRADE_PROTO_H_ diff --git a/src/caffe/layers/image_data_layer.cu b/src/caffe/layers/image_data_layer.cu index 9a73daae..7b4952d7 100644 --- a/src/caffe/layers/image_data_layer.cu +++ b/src/caffe/layers/image_data_layer.cu @@ -22,7 +22,7 @@ using std::pair; namespace caffe { template -Dtype ImagesLayer::Forward_gpu(const vector*>& bottom, +Dtype ImageDataLayer::Forward_gpu(const vector*>& bottom, vector*>* top) { // First, join the thread CHECK(!pthread_join(thread_, NULL)) << "Pthread joining failed."; @@ -34,11 +34,11 @@ Dtype ImagesLayer::Forward_gpu(const vector*>& bottom, prefetch_label_->cpu_data(), sizeof(Dtype) * prefetch_label_->count(), cudaMemcpyHostToDevice)); // Start a new prefetch thread - CHECK(!pthread_create(&thread_, NULL, ImagesLayerPrefetch, + CHECK(!pthread_create(&thread_, NULL, ImageDataLayerPrefetch, reinterpret_cast(this))) << "Pthread execution failed."; return Dtype(0.); } -INSTANTIATE_CLASS(ImagesLayer); +INSTANTIATE_CLASS(ImageDataLayer); } // namespace caffe diff --git a/src/caffe/proto/caffe.proto b/src/caffe/proto/caffe.proto index 34d59f9f..75750405 100644 --- a/src/caffe/proto/caffe.proto +++ b/src/caffe/proto/caffe.proto @@ -112,20 +112,21 @@ message LayerParameter { EUCLIDEAN_LOSS = 7; FLATTEN = 8; HDF5_DATA = 9; - IM2COL = 10; - IMAGE_DATA = 11; - INFOGAIN_LOSS = 12; - INNER_PRODUCT = 13; - LRN = 14; - MULTINOMIAL_LOGISTIC_LOSS = 15; - POOLING = 16; - RELU = 17; - SIGMOID = 18; - SOFTMAX = 19; - SOFTMAX_LOSS = 20; - SPLIT = 21; - TANH = 22; - WINDOW_DATA = 23; + HDF5_OUTPUT = 10; + IM2COL = 11; + IMAGE_DATA = 12; + INFOGAIN_LOSS = 13; + INNER_PRODUCT = 14; + LRN = 15; + MULTINOMIAL_LOGISTIC_LOSS = 16; + POOLING = 17; + RELU = 18; + SIGMOID = 19; + SOFTMAX = 20; + SOFTMAX_LOSS = 21; + SPLIT = 22; + TANH = 23; + WINDOW_DATA = 24; } optional LayerType type = 2; // the layer type from the enum above @@ -146,12 +147,13 @@ message LayerParameter { optional DataParameter data_param = 10; optional DropoutParameter dropout_param = 11; optional HDF5DataParameter hdf5_data_param = 12; - optional ImageDataParameter image_data_param = 13; - optional InfogainLossParameter infogain_loss_param = 14; - optional InnerProductParameter inner_product_param = 15; - optional LRNParameter lrn_param = 16; - optional PoolingParameter pooling_param = 17; - optional WindowDataParameter window_data_param = 18; + optional HDF5OutputParameter hdf5_output_param = 13; + optional ImageDataParameter image_data_param = 14; + optional InfogainLossParameter infogain_loss_param = 15; + optional InnerProductParameter inner_product_param = 16; + optional LRNParameter lrn_param = 17; + optional PoolingParameter pooling_param = 18; + optional WindowDataParameter window_data_param = 19; } // Message that stores parameters used by ConcatLayer @@ -209,6 +211,11 @@ message HDF5DataParameter { optional uint32 batch_size = 2; } +// Message that stores parameters used by HDF5OutputLayer +message HDF5OutputParameter { + optional string file_name = 1; +} + // Message that stores parameters used by ImageDataLayer message ImageDataParameter { // Specify the data source. @@ -298,7 +305,3 @@ message WindowDataParameter { // square: the tightest square around the window is cropped optional string crop_mode = 11 [default = "warp"]; } - -message HDF5OutputParameter { - optional string file_name = 1; -} diff --git a/src/caffe/test/test_upgrade_proto.cpp b/src/caffe/test/test_upgrade_proto.cpp index 82034065..4854eb19 100644 --- a/src/caffe/test/test_upgrade_proto.cpp +++ b/src/caffe/test/test_upgrade_proto.cpp @@ -1,4 +1,4 @@ -// Copyright 2014 Jeff Donahue +// Copyright 2014 BVLC and contributors. #include #include diff --git a/src/caffe/util/upgrade_proto.cpp b/src/caffe/util/upgrade_proto.cpp index 48813d83..27298f3d 100644 --- a/src/caffe/util/upgrade_proto.cpp +++ b/src/caffe/util/upgrade_proto.cpp @@ -1,4 +1,4 @@ -// Copyright 2014 Jeff Donahue +// Copyright 2014 BVLC and contributors. #include #include diff --git a/tools/upgrade_net_proto.cpp b/tools/upgrade_net_proto.cpp index 165d4ea9..41e41a99 100644 --- a/tools/upgrade_net_proto.cpp +++ b/tools/upgrade_net_proto.cpp @@ -1,4 +1,4 @@ -// Copyright 2014 Jeff Donahue +// Copyright 2014 BVLC and contributors. // // This is a script to upgrade "V0" network prototxts to the new format. // Usage: