Examples:
     from torch.utils.tensorboard import SummaryWriter
     writer = SummaryWriter()
     x = range(100)
     for i in x:
         writer.add_scalar('y=2x', i * 2, i)
     writer.close()

  Expected result:

  [image]

add_scalars(main_tag, tag_scalar_dict, global_step=None, walltime=None)
  Adds many scalar data to summary.

  Parameters:
     * **main_tag** (*str*) -- The parent name for the tags

     * **tag_scalar_dict** (*dict*) -- Key-value pair storing the
       tag and corresponding values

     * **global_step** (*int*) -- Global step value to record

     * **walltime** (*float*) -- Optional override default
       walltime (time.time()) seconds after epoch of event

  Examples:

     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),
