Fixed random seed for reproducible results

23 views
Skip to first unread message

Ruiyang Li

unread,
Jun 6, 2022, 2:13:05 PM6/6/22
to User Group for BigDL
Hi there,

I'm running a scala program using Keras-like API. I'd like to improve the performance of my deep learning model, but I get different results every time. Is there a way to set a fixed global random seed for reproducibility? Or any idea about how to get reproducible results with BigDL?

Thank you!
Ruiyang

huangka...@gmail.com

unread,
Jun 6, 2022, 9:59:46 PM6/6/22
to User Group for BigDL
Hi Ruiyang,

Can you try adding the following to set seed?
```
import com.intel.analytics.bigdl.dllib.utils.RandomGenerator

RandomGenerator.RNG.setSeed(seed)
```

Thanks,
Kai

Ruiyang Li

unread,
Jun 7, 2022, 6:22:42 PM6/7/22
to User Group for BigDL
Thank you, Kai! I will try this.

Best,
Ruiyang
Reply all
Reply to author
Forward
0 new messages