diff options
author | Jeff Donahue <jeff.donahue@gmail.com> | 2014-04-08 11:57:25 -0700 |
---|---|---|
committer | Jeff Donahue <jeff.donahue@gmail.com> | 2014-04-08 20:17:17 -0700 |
commit | 078e0bf713bcc4f9178f6694c66b368302448484 (patch) | |
tree | 1ec4d86df45854ff8b1bc13deaf1a31328c7ef54 /include/caffe/filler.hpp | |
parent | 81db75c6aef06ab0699690ad290a6853f2088711 (diff) | |
download | caffeonacl-078e0bf713bcc4f9178f6694c66b368302448484.tar.gz caffeonacl-078e0bf713bcc4f9178f6694c66b368302448484.tar.bz2 caffeonacl-078e0bf713bcc4f9178f6694c66b368302448484.zip |
make RNG function names more similar to other caffe math function names
Diffstat (limited to 'include/caffe/filler.hpp')
-rw-r--r-- | include/caffe/filler.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/caffe/filler.hpp b/include/caffe/filler.hpp index ba473e13..256a03be 100644 --- a/include/caffe/filler.hpp +++ b/include/caffe/filler.hpp @@ -51,7 +51,7 @@ class UniformFiller : public Filler<Dtype> { : Filler<Dtype>(param) {} virtual void Fill(Blob<Dtype>* blob) { CHECK(blob->count()); - caffe_vRngUniform<Dtype>(blob->count(), blob->mutable_cpu_data(), + caffe_rng_uniform<Dtype>(blob->count(), blob->mutable_cpu_data(), Dtype(this->filler_param_.min()), Dtype(this->filler_param_.max())); } @@ -65,7 +65,7 @@ class GaussianFiller : public Filler<Dtype> { virtual void Fill(Blob<Dtype>* blob) { Dtype* data = blob->mutable_cpu_data(); CHECK(blob->count()); - caffe_vRngGaussian<Dtype>(blob->count(), blob->mutable_cpu_data(), + caffe_rng_gaussian<Dtype>(blob->count(), blob->mutable_cpu_data(), Dtype(this->filler_param_.mean()), Dtype(this->filler_param_.std())); } @@ -79,7 +79,7 @@ class PositiveUnitballFiller : public Filler<Dtype> { virtual void Fill(Blob<Dtype>* blob) { Dtype* data = blob->mutable_cpu_data(); DCHECK(blob->count()); - caffe_vRngUniform<Dtype>(blob->count(), blob->mutable_cpu_data(), 0, 1); + caffe_rng_uniform<Dtype>(blob->count(), blob->mutable_cpu_data(), 0, 1); // We expect the filler to not be called very frequently, so we will // just use a simple implementation int dim = blob->count() / blob->num(); @@ -113,7 +113,7 @@ class XavierFiller : public Filler<Dtype> { CHECK(blob->count()); int fan_in = blob->count() / blob->num(); Dtype scale = sqrt(Dtype(3) / fan_in); - caffe_vRngUniform<Dtype>(blob->count(), blob->mutable_cpu_data(), + caffe_rng_uniform<Dtype>(blob->count(), blob->mutable_cpu_data(), -scale, scale); } }; |