Merge pull request #3725 from shaibagon/drop_nd_blobs

supporting N-D Blobs in Dropout layer Reshape
This commit is contained in:
Jeff Donahue 2016-02-28 00:31:17 -08:00
Родитель 04aa36e271 bef2c05d61
Коммит c2769c1096
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -23,8 +23,8 @@ void DropoutLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
NeuronLayer<Dtype>::Reshape(bottom, top);
// Set up the cache for random number generation
rand_vec_.Reshape(bottom[0]->num(), bottom[0]->channels(),
bottom[0]->height(), bottom[0]->width());
// ReshapeLike does not work because rand_vec_ is of Dtype uint
rand_vec_.Reshape(bottom[0]->shape());
}
template <typename Dtype>