赞
踩
import torch as t x = t.randn(8,1) print(x)
import torch as t t.manual_seed(100) # 设置随机数种子,编号固定为100,保证每次运行生成的tensor中的随机元素不变 x = t.randn(8,1) print(x)