RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
torch.meshgrid函数怎么使用

本篇内容介绍了“torch.meshgrid函数怎么使用”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

成都创新互联公司主营叶县网站建设的网络公司,主营网站建设方案,app软件定制开发,叶县h5微信小程序开发搭建,叶县网站营销推广欢迎叶县等地区企业咨询

代码实验举例:

Python 3.7.4 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.>>> import torch>>> x = torch.tensor([1, 2, 3])>>> y = torch.tensor([4, 5, 6, 7, 8])>>> x
tensor([1, 2, 3])>>> y
tensor([4, 5, 6, 7, 8])>>> grid_x, grid_y = torch.meshgrid(x, y)>>> grid_x
tensor([[1, 1, 1, 1, 1],[2, 2, 2, 2, 2],[3, 3, 3, 3, 3]])>>> grid_y
tensor([[4, 5, 6, 7, 8],[4, 5, 6, 7, 8],[4, 5, 6, 7, 8]])>>>>>>>>>

“torch.meshgrid函数怎么使用”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联网站,小编将为大家输出更多高质量的实用文章!


名称栏目:torch.meshgrid函数怎么使用
新闻来源:http://sczitong.cn/article/pgoshp.html