blob: fcf6ff526f7e9e29b45595badf4b675ff66c2689 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright 2013 Yangqing Jia
#include <vector>
#include "caffe/layer.hpp"
#include "caffe/vision_layers.hpp"
namespace caffe {
template <typename Dtype>
void NeuronLayer<Dtype>::SetUp(const vector<Blob<Dtype>*>& bottom,
vector<Blob<Dtype>*>* top) {
CHECK_EQ(bottom.size(), 1) << "Neuron Layer takes a single blob as input.";
CHECK_EQ(top->size(), 1) << "Neuron Layer takes a single blob as output.";
(*top)[0]->Reshape(bottom[0]->num(), bottom[0]->channels(),
bottom[0]->height(), bottom[0]->width());
};
INSTANTIATE_CLASS(NeuronLayer);
} // namespace caffe
|