深度学習のランダムシード
'''
,
,
,
, ,
paper ,
mini-batch SGD ,
batch size
step , ,
paper
'''
# pytorch
import torch
torch.manual_seed(5)
a=torch.randn(2,3)
print(a)
'''
,tensor a
tensor([[-0.4868, -0.6038, -0.5581],
[ 0.6675, -0.1974, 1.9428]])
'''
# numpy
import numpy as np
np.random.seed(15)
b=np.random.rand(5)
print(b)
# [0.8488177 0.17889592 0.05436321 0.36153845 0.27540093]
# random ,random python
import random
random.seed(10)
print(random.random())
# 0.5714025946899135