MCPcopy Create free account
hub / github.com/BVLC/caffe / InitRand

Method InitRand

src/caffe/data_transformer.cpp:523–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521
522template <typename Dtype>
523void DataTransformer<Dtype>::InitRand() {
524 const bool needs_rand = param_.mirror() ||
525 (phase_ == TRAIN && param_.crop_size());
526 if (needs_rand) {
527 const unsigned int rng_seed = caffe_rng_rand();
528 rng_.reset(new Caffe::RNG(rng_seed));
529 } else {
530 rng_.reset();
531 }
532}
533
534template <typename Dtype>
535int DataTransformer<Dtype>::Rand(int n) {

Callers 3

NumSequenceMatchesMethod · 0.80
TYPED_TESTFunction · 0.80
LayerSetUpMethod · 0.80

Calls 2

caffe_rng_randFunction · 0.85
resetMethod · 0.45

Tested by 2

NumSequenceMatchesMethod · 0.64
TYPED_TESTFunction · 0.64