首页 > 编程知识 正文

Tensor半精度,美国tensor公司

时间:2023-05-05 21:21:19 阅读:112227 作者:1487

Tensor基本数据类型

32位浮点torch.float3264位浮点torch.float6432位整数torch.int.3216位整数torch.int.1664位整数torch.int.64Tensor和numpy转换

torch.from_numpy(numpy矩阵) )。

Tensor矩阵. numpy (

示例:

x=torch.tensor ([ 6,2 ],dtype=torch.float32 ) x=torch.tensor ) [ 6,2 ],dtype=torch.float 32 (xout ) ) 10 dype=torch.float 32 (xout [ 16 ] : tensor ([0.0.],[0.0.],[0.0.],)

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。