diff options
author | Yangqing Jia <jiayq84@gmail.com> | 2013-10-24 11:14:08 -0700 |
---|---|---|
committer | Yangqing Jia <jiayq84@gmail.com> | 2013-10-24 11:14:08 -0700 |
commit | 6f69c3050f7307e7783005bd839f37769f9cac71 (patch) | |
tree | 747eef55fcf171aa54ad54142b89aea56cd6eff0 /src | |
parent | 6f36b7f554f0fff62dd7688d456cd4d0274fc3a8 (diff) | |
download | caffe-6f69c3050f7307e7783005bd839f37769f9cac71.tar.gz caffe-6f69c3050f7307e7783005bd839f37769f9cac71.tar.bz2 caffe-6f69c3050f7307e7783005bd839f37769f9cac71.zip |
common.cpp rand seed: do time(NULL) so we can have different initializations
Diffstat (limited to 'src')
-rw-r--r-- | src/caffe/common.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/caffe/common.cpp b/src/caffe/common.cpp index 1fce86a2..c254d70e 100644 --- a/src/caffe/common.cpp +++ b/src/caffe/common.cpp @@ -36,13 +36,13 @@ Caffe::Caffe() // Try to create a curand handler. if (curandCreateGenerator(&curand_generator_, CURAND_RNG_PSEUDO_DEFAULT) != CURAND_STATUS_SUCCESS || - curandSetPseudoRandomGeneratorSeed(curand_generator_, 1701ULL) + curandSetPseudoRandomGeneratorSeed(curand_generator_, time(NULL)) != CURAND_STATUS_SUCCESS) { LOG(ERROR) << "Cannot create Curand generator. Curand won't be available."; } // Try to create a vsl stream. This should almost always work, but we will // check it anyway. - if (vslNewStream(&vsl_stream_, VSL_BRNG_MT19937, 1701) != VSL_STATUS_OK) { + if (vslNewStream(&vsl_stream_, VSL_BRNG_MT19937, time(NULL)) != VSL_STATUS_OK) { LOG(ERROR) << "Cannot create vsl stream. VSL random number generator " << "won't be available."; } |