| 20 | |
| 21 | template <typename Dtype> |
| 22 | void DropoutLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom, |
| 23 | const vector<Blob<Dtype>*>& top) { |
| 24 | NeuronLayer<Dtype>::Reshape(bottom, top); |
| 25 | // Set up the cache for random number generation |
| 26 | // ReshapeLike does not work because rand_vec_ is of Dtype uint |
| 27 | rand_vec_.Reshape(bottom[0]->shape()); |
| 28 | } |
| 29 | |
| 30 | template <typename Dtype> |
| 31 | void DropoutLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom, |