Pytorch中使用tensorboard的方法

这篇文章主要讲解了“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的方法这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!


当前名称:Pytorch中使用tensorboard的方法
文章网址:http://myzitong.com/article/gdpcos.html