This commit is contained in:
Jonathan L Long 2014-05-26 02:31:34 -07:00 коммит произвёл Evan Shelhamer
Родитель 1ee22bf761
Коммит a65cb967e6
3 изменённых файлов: 0 добавлений и 5 удалений

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

@ -33,7 +33,6 @@ void TanHLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
const Dtype* top_diff = top[0]->cpu_diff(); const Dtype* top_diff = top[0]->cpu_diff();
Dtype* bottom_diff = (*bottom)[0]->mutable_cpu_diff(); Dtype* bottom_diff = (*bottom)[0]->mutable_cpu_diff();
const int count = (*bottom)[0]->count(); const int count = (*bottom)[0]->count();
Dtype exp2x;
Dtype tanhx; Dtype tanhx;
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
tanhx = top_data[i]; tanhx = top_data[i];

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

@ -42,7 +42,6 @@ void Net<Dtype>::Init(const NetParameter& in_param) {
name_ = param.name(); name_ = param.name();
map<string, int> blob_name_to_idx; map<string, int> blob_name_to_idx;
set<string> available_blobs; set<string> available_blobs;
int num_layers = param.layers_size();
CHECK_EQ(param.input_size() * 4, param.input_dim_size()) CHECK_EQ(param.input_size() * 4, param.input_dim_size())
<< "Incorrect input blob dimension specifications."; << "Incorrect input blob dimension specifications.";
memory_used_ = 0; memory_used_ = 0;
@ -58,7 +57,6 @@ void Net<Dtype>::Init(const NetParameter& in_param) {
bottom_id_vecs_.resize(param.layers_size()); bottom_id_vecs_.resize(param.layers_size());
top_id_vecs_.resize(param.layers_size()); top_id_vecs_.resize(param.layers_size());
for (int layer_id = 0; layer_id < param.layers_size(); ++layer_id) { for (int layer_id = 0; layer_id < param.layers_size(); ++layer_id) {
bool in_place = false;
const LayerParameter& layer_param = param.layers(layer_id); const LayerParameter& layer_param = param.layers(layer_id);
layers_.push_back(shared_ptr<Layer<Dtype> >(GetLayer<Dtype>(layer_param))); layers_.push_back(shared_ptr<Layer<Dtype> >(GetLayer<Dtype>(layer_param)));
layer_names_.push_back(layer_param.name()); layer_names_.push_back(layer_param.name());
@ -198,7 +196,6 @@ int Net<Dtype>::AppendBottom(const NetParameter& param,
bottom_vecs_[layer_id].push_back(blobs_[blob_id].get()); bottom_vecs_[layer_id].push_back(blobs_[blob_id].get());
bottom_id_vecs_[layer_id].push_back(blob_id); bottom_id_vecs_[layer_id].push_back(blob_id);
available_blobs->erase(blob_name); available_blobs->erase(blob_name);
bool need_backward = param.force_backward() || blob_need_backward_[blob_id];
return blob_id; return blob_id;
} }

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

@ -116,7 +116,6 @@ int feature_extraction_pipeline(int argc, char** argv) {
leveldb::WriteBatch* batch = new leveldb::WriteBatch(); leveldb::WriteBatch* batch = new leveldb::WriteBatch();
const int kMaxKeyStrLength = 100; const int kMaxKeyStrLength = 100;
char key_str[kMaxKeyStrLength]; char key_str[kMaxKeyStrLength];
int num_bytes_of_binary_code = sizeof(Dtype);
vector<Blob<float>*> input_vec; vector<Blob<float>*> input_vec;
int image_index = 0; int image_index = 0;
for (int batch_index = 0; batch_index < num_mini_batches; ++batch_index) { for (int batch_index = 0; batch_index < num_mini_batches; ++batch_index) {