Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of using tensorboard in Pytorch

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "the method of using tensorboard in Pytorch". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the method of using tensorboard in Pytorch".

Code:

From torch.utils.tensorboard import SummaryWriterimport torchvertices_tensor = torch.as_tensor ([[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

Show the running effect:

Thank you for your reading, the above is the content of "the method of using tensorboard in Pytorch". After the study of this article, I believe you have a deeper understanding of the method of using tensorboard in Pytorch, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report