UltraLight-VM-UNet icon indicating copy to clipboard operation
UltraLight-VM-UNet copied to clipboard

tensorboard

Open kkkkkkkb opened this issue 9 months ago • 3 comments

请问如何显示tensorboard,train里面的代码没用相关函数~ 我按照vmunet里train.py修改了,但是出现的结果不太对。 我是这么修改的:

  1. train.py:

    • 添加了: global writer writer = SummaryWriter(config.work_dir + 'summary')
    • 在train_one_epoch添加writer参数: train_one_epoch( train_loader, model, criterion, optimizer, scheduler, epoch, logger, config, writer, scaler=scaler )
  2. engine.py:def train_one_epoch 函数添加writer参数,并在函数内加了句writer.add_scalar('loss', loss, epoch)

最后的结果如下图 WX20240509-190316@2x

kkkkkkkb avatar May 09 '24 11:05 kkkkkkkb

Hi, according to the graph you have provided, Loss is decreasing at 0-50 epochs and is increasing at 50-100 epochs. 100 epochs is one cycle. According to the graph you have provided, Loss will further decrease at 100-150 epoch, such a trend is normal. This is because the scheduler with 'CosineAnnealingLR' is set by default.

What are the results you are referring to?

wurenkai avatar May 09 '24 13:05 wurenkai

Hi, according to the graph you have provided, Loss is decreasing at 0-50 epochs and is increasing at 50-100 epochs. 100 epochs is one cycle. According to the graph you have provided, Loss will further decrease at 100-150 epoch, such a trend is normal. This is because the scheduler with 'CosineAnnealingLR' is set by default.

What are the results you are referring to?

谢谢,原来这是正常的结果,一开始loss抖动太大所以我没看明白。

kkkkkkkb avatar May 11 '24 14:05 kkkkkkkb

Hi, according to the graph you have provided, Loss is decreasing at 0-50 epochs and is increasing at 50-100 epochs. 100 epochs is one cycle. According to the graph you have provided, Loss will further decrease at 100-150 epoch, such a trend is normal. This is because the scheduler with 'CosineAnnealingLR' is set by default.

What are the results you are referring to?

给作者一个反馈,我在ISIC2017上跑出了跟您论文上一样的结果,太优秀了!但是在自己数据集上跑完300个epoch,dice竟然0.02,我是一个多分类的任务,可能我的代码还有些问题,包括数据集的处理。

kkkkkkkb avatar May 17 '24 09:05 kkkkkkkb