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

推理过程中,flod_flag设为False时预测结果为0。 #44

Open
apuomline opened this issue Oct 31, 2023 · 1 comment
Open

推理过程中,flod_flag设为False时预测结果为0。 #44

apuomline opened this issue Oct 31, 2023 · 1 comment

Comments

@apuomline
Copy link

apuomline commented Oct 31, 2023

作者,你好!我在运行推理函数step3_TestOrInference.py时,将fold_flag设为False后模型预测结果直接输出为0。但是当我将flod_flag设为True时,模型可以输出结果。会有预测结果图像生成。
image

下面是我更改的代码部分:
img_path = r'tn3k_dian2\tn3k_point\test-image'
mask_path = r'tn3k_dian2\tn3k_point\test-mask'
csv_file = r'tn3k_dian2\output.csv'
save_path = r'inference'

# 是否使用设定好的分折信息
fold_flag =False  # 预测测试集则设置为False直接读取img_path中PNG文件进行测试,True则使用分折信息

使用的模型权重文件也存在:
weight_c1=r'result\TNSCUI\dpv3plus_stage1_5_1\models\epoch400_Testdice0.0000.pkl'
weight_c2=r'result\TNSCUI\dpv3plus_stage2_5_1\models\epoch400_Testdice0.0000.pkl'

请问问题出在哪里?

@HolicAnn
Copy link

@apuomline 老哥,想请教一下,为啥我一直调不起来GPU,怎么设置都是CPU在跑

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

2 participants