pyTorch.randn()、rand()、cat()、pow()、scatter_()、.squeeze() 、.unsqueeze()
文章目录torch.randn()torch.rand()torch.cat()torch.pow().item().scatter_().squeeze().unsqueeze() torch.randn() torch.randn(*sizes, out=None) → Tensor 返回一个张量,包含了从标准正态分布(均值为0,方差为 1,即高斯白噪声)中抽取一组随机数,形状由可变参数sizes定义。 参数: sizes(int...): 整数序列,定义了输出形状 out (Tensor, optinal) : 结果张量 例子: >>> torch.randn(4) -0.1145 0.
下载地址
用户评论