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

Method Rand

src/caffe/data_transformer.cpp:535–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533
534template <typename Dtype>
535int DataTransformer<Dtype>::Rand(int n) {
536 CHECK(rng_);
537 CHECK_GT(n, 0);
538 caffe::rng_t* rng =
539 static_cast<caffe::rng_t*>(rng_->generator());
540 return ((*rng)() % n);
541}
542
543INSTANTIATE_CLASS(DataTransformer);
544

Callers

nothing calls this directly

Calls 1

generatorMethod · 0.80

Tested by

no test coverage detected