0
点赞
收藏
分享

微信扫一扫

亚信安慧AntDB数据并行加载工具的实现(二)

Aliven888 03-05 22:00 阅读 4

一、Pytorch的基本元素操作

 1.引入torch

from __future__ import print_function
import torch

2.创建矩阵

x = torch.empty(5,3)
print(x)

3.输出结果:

4.指定一个全零矩阵并可指定数据元素的类型为long

x = torch.zeros(5,3, dtype=torch.long)
print(x)

5.输出结果

未完待续。。。

举报

相关推荐

0 条评论