in Configure, set random seed only for uninitialized model
This commit is contained in:
parent
0527b17c9d
commit
3e0732dea9
@ -189,10 +189,10 @@ class LearnerImpl : public Learner {
|
||||
mparam.InitAllowUnknown(args);
|
||||
name_obj_ = cfg_["objective"];
|
||||
name_gbm_ = cfg_["booster"];
|
||||
// set seed only before the model is initialized
|
||||
common::GlobalRandom().seed(tparam.seed);
|
||||
}
|
||||
|
||||
common::GlobalRandom().seed(tparam.seed);
|
||||
|
||||
// set number of features correctly.
|
||||
cfg_["num_feature"] = common::ToString(mparam.num_feature);
|
||||
cfg_["num_class"] = common::ToString(mparam.num_class);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user