Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问为什么要在训练代码中使用测试集选择最好的模型呢? #3

Open
LIKP0 opened this issue Feb 4, 2025 · 0 comments

Comments

@LIKP0
Copy link

LIKP0 commented Feb 4, 2025

您好!感谢您开源代码,这对我有很大帮助!

但是我对您train_brats.py中如下的代码有些疑惑:

for epoch_num in tqdm(range(max_epoch), ncols=70):
    time1 = time.time()
    for i_batch, (sampled_batch, sample_stats) in enumerate(trainloader):
        ........

   ## ================ Evaluate ================
    logging.info(f'Epoch {epoch_num} Evaluation:')
    # print()
    t1_MSE_all, t1_PSNR_all, t1_SSIM_all = [], [], []
    t2_MSE_all, t2_PSNR_all, t2_SSIM_all = [], [], []
  
    t1_MSE_krecon, t1_PSNR_krecon, t1_SSIM_krecon = [], [], []
    t2_MSE_krecon, t2_PSNR_krecon, t2_SSIM_krecon = [], [], []
  
    for (sampled_batch, sample_stats) in testloader:
      ........

请问为什么要在训练代码中使用测试集选择best model呢?可能我的理解有误,但是我同样没有在训练代码中发现验证集?

再次感谢您的精彩工作,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant