some post rebase fixes -- copyright, hdf5_output layer (still need to

incorporate into util/upgrade_proto)
This commit is contained in:
Jeff Donahue 2014-03-27 12:34:40 -07:00
Родитель 8198585b4a
Коммит b7444d63e2
6 изменённых файлов: 34 добавлений и 31 удалений

Просмотреть файл

@ -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_

Просмотреть файл

@ -22,7 +22,7 @@ using std::pair;
namespace caffe {
template <typename Dtype>
Dtype ImagesLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
Dtype ImageDataLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
vector<Blob<Dtype>*>* top) {
// First, join the thread
CHECK(!pthread_join(thread_, NULL)) << "Pthread joining failed.";
@ -34,11 +34,11 @@ Dtype ImagesLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
prefetch_label_->cpu_data(), sizeof(Dtype) * prefetch_label_->count(),
cudaMemcpyHostToDevice));
// Start a new prefetch thread
CHECK(!pthread_create(&thread_, NULL, ImagesLayerPrefetch<Dtype>,
CHECK(!pthread_create(&thread_, NULL, ImageDataLayerPrefetch<Dtype>,
reinterpret_cast<void*>(this))) << "Pthread execution failed.";
return Dtype(0.);
}
INSTANTIATE_CLASS(ImagesLayer);
INSTANTIATE_CLASS(ImageDataLayer);
} // namespace caffe

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -1,4 +1,4 @@
// Copyright 2014 Jeff Donahue
// Copyright 2014 BVLC and contributors.
#include <cstring>
#include <string>

Просмотреть файл

@ -1,4 +1,4 @@
// Copyright 2014 Jeff Donahue
// Copyright 2014 BVLC and contributors.
#include <google/protobuf/text_format.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>

Просмотреть файл

@ -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: