Pytorch中使用tensorboard的方法

发布时间:2021-07-21 09:25:51 作者:chen
来源:亿速云 阅读:134

这篇文章主要讲解了“Pytorch中使用tensorboard的方法”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Pytorch中使用tensorboard的方法”吧!

代码:

from torch.utils.tensorboard import SummaryWriterimport torch
vertices_tensor = torch.as_tensor([[1, 1, 1],[-1, -1, 1],[1, -1, -1],[-1, 1, -1],], dtype=torch.float).unsqueeze(0)colors_tensor = torch.as_tensor([[255, 0, 0],[0, 255, 0],[0, 0, 255],[255, 0, 255],], dtype=torch.int).unsqueeze(0)faces_tensor = torch.as_tensor([[0, 2, 3],[0, 3, 1],[0, 1, 2],[1, 3, 2],], dtype=torch.int).unsqueeze(0)writer = SummaryWriter()writer.add_mesh('my_mesh', vertices=vertices_tensor, colors=colors_tensor, faces=faces_tensor)writer.close()# tensorboard --logdir=runs

运行效果展示:
Pytorch中使用tensorboard的方法

感谢各位的阅读,以上就是“Pytorch中使用tensorboard的方法”的内容了,经过本文的学习后,相信大家对Pytorch中使用tensorboard的方法这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!

推荐阅读:
  1. Pytorch中TensorBoard及torchsummary的使用方法
  2. PyTorch中TensorBoard如何使用

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

pytorch tensorboard

上一篇:Node中exports有哪些设计模式

下一篇:Node.js中怎么利用中间件实现服务端缓存

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》