标签:图片 points inf alt orm nbsp tor number png
torch.linspace(start, end, steps) returns a one-dimensional tensor of equally spaced points between [start, end]。steps默认值是100。
torch.rand(size) returns a tensor filled with random numbers from a uniform distribution on the interval [0, 1).
torch.randn(size) returns a tensor filled with random numbers from a normal distribution with mean `0` and variance `1` (also called the standard normal distribution).
torch.normal returns a tensor of random numbers drawn from separate normal distributions whose mean and standard deviation are given.
The arguments `mean` is a tensor with the mean of each output element‘s normal distribution.
The arguments `std` is a tensor with the standard deviation of each output element‘s normal distribution.
torch.normal的参数给定方法有很多种:
参考文献:PyTorch帮助文档
pytorch的linspace, rand, randn, normal
标签:图片 points inf alt orm nbsp tor number png
原文地址:https://www.cnblogs.com/picassooo/p/12344992.html