Closed qianmeng19 closed 6 months ago
报的啥错呢
---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2024年4月26日 21:54 | | 收件人 | @.> | | 抄送人 | @.***> | | 主题 | [iamstarlee/Multi-label-Sewer-Classification] 验证问题 (Issue #8) |
请问我修改了网络结构后,inference.py验证会出现错误,这种情况应该怎样解决
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Traceback (most recent call last):
File "E:\Multi-label-Sewer-Classification-main\inference.py", line 186, in
还有就是训练好的模型是不是都是ckpt格式的,但是我的输出是名称是events.out.tfevents.1714136754.PC-202310272034,导致加载模型时报错:Traceback (most recent call last):
File "E:\Multi-label-Sewer-Classification-main\inference.py", line 186, in
看上去是参数没对齐,就是你加载的模型参数不是inference.py代码里调用的模型训出来的
---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2024年4月26日 21:54 | | 收件人 | @.> | | 抄送人 | @.***> | | 主题 | [iamstarlee/Multi-label-Sewer-Classification] 验证问题 (Issue #8) |
请问我修改了网络结构后,inference.py验证会出现错误,这种情况应该怎样解决
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
模型保存的格式除了ckpt还有pt,events.out.tfevents格式应该是tensorboard可视化的文件格式
---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2024年4月26日 22:14 | | 收件人 | @.> | | 抄送人 | Xinxin @.>, @.> | | 主题 | Re: [iamstarlee/Multi-label-Sewer-Classification] 验证问题 (Issue #8) |
还有就是训练好的模型是不是都是ckpt格式的,但是我的输出是名称是events.out.tfevents.1714136754.PC-202310272034,导致加载模型时报错:Traceback (most recent call last): File "E:\Multi-label-Sewer-Classification-main\inference.py", line 186, in run_inference(args) File "E:\Multi-label-Sewer-Classification-main\inference.py", line 111, in run_inference updated_state_dict, model_name, num_classes, training_mode, br_defect = load_model(model_path, best_weights) File "E:\Multi-label-Sewer-Classification-main\inference.py", line 69, in load_model model_last_ckpt = torch.load(last_ckpt_path) File "C:\ProgramData\anaconda3\envs\torch\lib\site-packages\torch\serialization.py", line 1028, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "C:\ProgramData\anaconda3\envs\torch\lib\site-packages\torch\serialization.py", line 1246, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) _pickle.UnpicklingError: invalid load key, '\x18'.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
请问那这两个问题应该怎样解决呢
你把你的模型结构代码和推理代码贴出来,我瞅瞅
可以给一下邮箱,通过邮箱发送吗
已发送谢谢
请问收到邮件了吗
1.加载events.out.tfevents格式的还是会报错:Traceback (most recent call last):
File "E:\Multi-label-Sewer-Classification-main\inference.py", line 187, in
我可以给你我的模型文件请问能帮我解决吗
请问我修改了网络结构后,inference.py验证会出现错误,这种情况应该怎样解决