码迷,mamicode.com
首页 > 编程语言 > 详细

Python 12 基础知识

时间:2019-07-22 15:09:20      阅读:104      评论:0      收藏:0      [点我收藏+]

标签:就是   art   html   tps   logs   针对   numpy   nump   htm   

原文:https://www.cnblogs.com/Lee-yl/p/9884055.html

原文:https://blog.csdn.net/juxiangming/article/details/70175985

 

 

在机器学习当中,什么是训练?什么是模型?

  通过已知的数据和目标,调节算法的参数,这就是训练;
  最后得到的映射,就是针对这个问题被训练出来的模型。

 

Tensor和numpy之间的转换:

  通过a.numpy(),就能将Tensor a转换成numpy数据类型,同时使用torch.from_numpy()就能将numpy转换成tensor,

  如果需要更改tensor的数据类型,只需要在转换后面加上需要的类型,如想将a的类型转换成float,只需a.float()就可以了。

 

Python 12 基础知识

标签:就是   art   html   tps   logs   针对   numpy   nump   htm   

原文地址:https://www.cnblogs.com/guxingy/p/11225781.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!