本文簡要介紹python語言中 torch.utils.tensorboard.writer.SummaryWriter.add_scalars
的用法。
用法:
add_scalars(main_tag, tag_scalar_dict, global_step=None, walltime=None)
將許多標量數據添加到摘要中。
例子:
from torch.utils.tensorboard import SummaryWriter writer = SummaryWriter() r = 5 for i in range(100): writer.add_scalars('run_14h', {'xsinx':i*np.sin(i/r), 'xcosx':i*np.cos(i/r), 'tanx': np.tan(i/r)}, i) writer.close() # This call adds three values to the same scalar plot with the tag # 'run_14h' in TensorBoard's scalar section.
預期結果:
參數:
相關用法
- Python PyTorch SummaryWriter.add_scalar用法及代碼示例
- Python PyTorch SummaryWriter.add_histogram用法及代碼示例
- Python PyTorch SummaryWriter.add_pr_curve用法及代碼示例
- Python PyTorch SummaryWriter.add_custom_scalars用法及代碼示例
- Python PyTorch SummaryWriter.add_image用法及代碼示例
- Python PyTorch SummaryWriter.add_hparams用法及代碼示例
- Python PyTorch SummaryWriter.add_images用法及代碼示例
- Python PyTorch SummaryWriter.add_embedding用法及代碼示例
- Python PyTorch SummaryWriter.add_text用法及代碼示例
- Python PyTorch SummaryWriter.add_mesh用法及代碼示例
- Python PyTorch SummaryWriter.__init__用法及代碼示例
- Python PyTorch ScaledDotProduct.__init__用法及代碼示例
- Python PyTorch Sigmoid用法及代碼示例
- Python PyTorch ShardedEmbeddingBagCollection.named_parameters用法及代碼示例
- Python PyTorch ScriptModule.state_dict用法及代碼示例
- Python PyTorch Softmin用法及代碼示例
- Python PyTorch Softmax2d用法及代碼示例
- Python PyTorch ShardedEmbeddingBag.named_parameters用法及代碼示例
- Python PyTorch ScriptModule.register_full_backward_hook用法及代碼示例
- Python PyTorch ScriptModule.parameters用法及代碼示例
- Python PyTorch ShardedEmbeddingBag.state_dict用法及代碼示例
- Python PyTorch Store.num_keys用法及代碼示例
- Python PyTorch ShardedEmbeddingBagCollection.named_modules用法及代碼示例
- Python PyTorch ScriptModule.register_forward_hook用法及代碼示例
- Python PyTorch ShardedEmbeddingBagCollection.state_dict用法及代碼示例
注:本文由純淨天空篩選整理自pytorch.org大神的英文原創作品 torch.utils.tensorboard.writer.SummaryWriter.add_scalars。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。