PyTorch-1.10(三)--torch张量随机生成、采样
随机采样
默认返回CPU torch.Generator
就地随机抽样
还有一些在张量上定义的随机抽样函数:
-
- in-place version of - numbers drawn from the Cauchy distribution - numbers drawn from the exponential distribution - elements drawn from the geometric distribution - samples from the log-normal distribution - in-place version of - numbers sampled from the discrete uniform distribution - numbers sampled from the continuous uniform distribution