title: tensorboard "No scalar data was found."
body: <p>This is my first time using the tensorboard.
  I've followed many tutorials, but the result that comes back to me is the same as the attached image below.</p>
  <p><a href="https://i.stack.imgur.com/36x93.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/36x93.jpg" alt="enter image description here" /></a></p>
  <p>This is the code I wrote using the tensorboard.</p>
  <pre><code>self.writer = SummaryWriter('SimCLR_Code/SimCLR/runs') 
  
  ...
  
  def train(self, train_loader): 
          scaler = GradScaler(enabled=self.args.fp16_precision) 
  
          sess = tf.Session() 
          self.writer = tf.summary.FileWriter('./runs/graphs', sess.graph)
          #saver = tf.train.Saver(tf.global_variables()) 
          #ckpt = tf.train.get
  
          # save config file
          save_config_file(self.writer.log_dir, self.args)
  
          n_iter = 0  #global optimization step
          logging.info(f&quot;Start SimCLR training for {self.args.epochs} epochs.&quot;)
          logging.info(f&quot;Training with gpu: {self.args.disable_cuda}.&quot;)
  
          for epoch_counter in range(self.args.epochs): 
              for images, _ in tqdm(train_loader):
                  images = torch.cat(images, dim=0)
  
                  images = images.to(self.args.device)
  
                  with autocast(enabled=self.args.fp16_precision):
                      features = self.model(images) 
                      logits, labels = self.info_nce_loss(features) 
                      loss = self.criterion(logits, labels) 
  
                  self.optimizer.zero_grad() 
                  scaler.scale(loss).backward() 
  
                  scaler.step(self.optimizer) 
                  scaler.update()
  
                  if n_iter % self.args.log_every_n_steps == 0: 
                      top1, top5 = accuracy(logits, labels, topk=(1, 5))
                      self.writer.add_scalar('loss', loss, global_step=n_iter)
                      self.writer.add_scalar('acc/top1', top1[0], global_step=n_iter)
                      self.writer.add_scalar('acc/top5', top5[0], global_step=n_iter)
                      self.writer.add_scalar('learning_rate', self.scheduler.get_lr()[0], global_step=n_iter)
  
                  n_iter += 1 
  
                  # warmup for the first 10 epochs
                  if epoch_counter &gt;= 10:
                      try: 
                          self.scheduler.step()  
                      except ZeroDivisionError:
                          print(&quot;ZeroDivision&quot;)
                  logging.debug(f&quot;Epoch: {epoch_counter}\tLoss: {loss}\tTop1 accuracy: {top1[0]}&quot;)  #훈련과정 출력
  
          logging.info(&quot;Training has finished.&quot;)
          # save model checkpoints
          checkpoint_name = 'checkpoint_{:04d}.pth.tar'.format(self.args.epochs)
          save_checkpoint({
              'epoch': self.args.epochs,
              'arch': self.args.arch,
              'state_dict': self.model.state_dict(),
              'optimizer': self.optimizer.state_dict(),
          }, is_best=False, filename=os.path.join(self.writer.log_dir, checkpoint_name))
          logging.info(f&quot;Model checkpoint and metadata has been saved at {self.writer.log_dir}.&quot;)
  
          # merged = tf.summary.merge_all() 
          # writer = tf.summary.FileWriter
          
          self.writer.flush()
          self.writer.close()
  </code></pre>
  <p>And here is my file routes</p>
  <p><a href="https://i.stack.imgur.com/rqD76.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rqD76.png" alt="enter image description here" /></a></p>
  <p>I've been thinking about it for several days, but there's no progress.
  Please give me a lot of advice.</p>