首页 > 其他 > 详细

torch.randn(1,2)和torch.randn((1,2))一样吗?

时间:2021-06-26 11:55:02      阅读:34      评论:0      收藏:0      [点我收藏+]

他们俩个输出的结果是一样的。

print(torch.randn((4, 1)))
print(torch.randn(4, 1))

tensor([[-0.6260],
[ 0.3451],
[ 0.9653],
[-1.5156]])
tensor([[-0.3110],
[ 0.2371],
[ 0.2829],
[ 0.2155]])

torch.randn(1,2)和torch.randn((1,2))一样吗?

原文:https://www.cnblogs.com/hahaah/p/14932859.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!