pytorch机器学习_机器学习— PyTorch

pytorch机器学习

PyTorch : It is an open source machine learning library based on the Torch library (which is based on Lua Programming Language), developed by Facebook’s AI Research lab.

PyTorch:这是一个基于Torch库(基于Lua编程语言)的开源机器学习库,该库由Facebook的AI Research Lab开发。

It can also use the power of graphics processing unit and so it is one of the preferred library for deep learning. TensorFlow is another great library for tensor operations in deep learning.

它还可以利用图形处理单元的功能,因此它是深度学习的首选库之一。 TensorFlow是另一个用于深度学习中的张量操作的出色库。

PyTorch is easy to learn and integrates easily with other python packages makes it a simple choice for researchers to use.

PyTorch易于学习,并且易于与其他python软件包集成,这使其成为研究人员使用的简单选择。

Tensor : A tensor is a generalization of scalar, vectors and matrices or we can say these are the special cases of a tensor and can easily understood as a multidimensional array. All values in a tensor hold identical data type with a known (or partially known) shape.

张量:张量是标量,向量和矩阵的泛化,或者我们可以说这些是张量的特例,可以很容易地理解为多维数组。 张量中的所有值均具有相同的数据类型,且具有已知(或部分已知)的形状。

Image for post

Install the PyTorch python library : from here

从这里安装PyTorch python库:

Syntax to create tensor with PyTorch :

使用PyTorch创建张量的语法:

This is how you can create n-dimensional tensors with PyTorch.

这就是使用PyTorch创建n维张量的方法。

以下是一些PyTorch函数,我们将进行探索: (Here are some of the PyTorch functions, we are going to explore:)

view, flip, ne, topk, bincount

查看,翻转,ne,topk,bincount

1.火炬。张量。视图(*形状) (1. torch.Tensor.view(*shape)

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值