From 13b25d272b057b5a597b6089ff1fc72f524a3493 Mon Sep 17 00:00:00 2001 From: tornadomeet Date: Thu, 11 Aug 2016 16:01:24 +0800 Subject: [PATCH] src/io/iter_image_recordio.cc let all randomness with seed be related to time(0) --- src/io/iter_image_recordio.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/iter_image_recordio.cc b/src/io/iter_image_recordio.cc index 42ae5c89757c..1b5f961571a6 100644 --- a/src/io/iter_image_recordio.cc +++ b/src/io/iter_image_recordio.cc @@ -196,7 +196,7 @@ inline void ImageRecordIOParser::Init( augmenters_[i].emplace_back(ImageAugmenter::Create(aug_name)); augmenters_[i].back()->Init(kwargs); } - prnds_.emplace_back(new common::RANDOM_ENGINE((i + 1) * kRandMagic)); + prnds_.emplace_back(new common::RANDOM_ENGINE((i + 1) * kRandMagic + time(0))); } if (param_.path_imglist.length() != 0) { label_map_.reset(new ImageLabelMap(param_.path_imglist.c_str(), @@ -300,7 +300,7 @@ struct ImageRecordParam: public dmlc::Parameter { DMLC_DECLARE_PARAMETER(ImageRecordParam) { DMLC_DECLARE_FIELD(shuffle).set_default(false) .describe("Augmentation Param: Whether to shuffle data."); - DMLC_DECLARE_FIELD(seed).set_default(0) + DMLC_DECLARE_FIELD(seed).set_default(time(0)) .describe("Augmentation Param: Random Seed."); DMLC_DECLARE_FIELD(verbose).set_default(true) .describe("Auxiliary Param: Whether to output information.");