Excuse me, I am reproducing the paper. There is no calculation of SSIM in train.py. When saving at 20,000 iterations, there is no SSIM. Could you check it? This will be of great help to my reproduction work. Thank you very much.
# psnr_list = []
# --- Use the evaluation model in testing --- #
net.eval()
# --- Log the validation results --- #
if config.ddp is True:
if dist.get_rank() == 0:
psnr_list, ssim_list = validation(config, net, val_data_loader, device, config.exp_name, support_data)
val_psnr = sum(psnr_list) / len(psnr_list)
val_ssim = sum(ssim_list) / len(ssim_list)
tb_logging(config, writer, psnr_list, ssim_list, batch_id)
else:
if config.stage == 0:
print(f'sum(ssim_list) = {sum(ssim_list)}')
print(f'len(ssim_list) = {len(ssim_list)}')
tb_logging(config, writer, psnr_list, ssim_list, None, None, batch_id)
print(f'sum(ssim_list) = {sum(ssim_list)}')
print(f'len(ssim_list) = {len(ssim_list)}')
if config.stage == 1:
if config.meta_train is True:
eval_psnr, eval_ssim = validation_val(config, net, test_loader, device, savedir, support_data, True)
if config.meta_train is False:
eval_psnr, eval_ssim = validation_val(config, net, test_loader, device, savedir, None, True)
print('eval_psnr: {0:.2f}, eval_ssim: {1:.4f}'.format(eval_psnr, eval_ssim)`
Excuse me, I am reproducing the paper. There is no calculation of SSIM in train.py. When saving at 20,000 iterations, there is no SSIM. Could you check it? This will be of great help to my reproduction work. Thank you very much.
` if batch_id % config.val_iter == config.val_iter-1:
torch.save(net.state_dict(), '{}/latest_finetune'.format(savedir))
# --- Calculate the average training PSNR in one epoch --- #
train_psnr = sum(psnr_list) / len(psnr_list)
print(f'sum(psnr_list) = {sum(psnr_list)}')
print(f'len(psnr_list) = {len(psnr_list)}')