log_dir=f"log/PDT_SeNet/unable3/S456_T7/Nov30_17-14-02/"
model_file = os.path.join(log_dir, 'best.pkl')
model_file2=f"log/PDT_SeNet/unable3/S456_T7/Nov30_19-14-02/best.pkl"
print(f"model_file={model_file}")
print(f"os.path.exists(model_file)={os.path.exists(model_file)}")
print(f"model_file2={model_file2}")
print(f"os.path.exists(model_file2)={os.path.exists(model_file2)}")
返回false,说明文件地址不存在,对应目录检查一下是不是写错了。
log_dir=f"log/PDT_SeNet/unable3/S456_T7/Nov30_19-14-02/"
model_file = os.path.join(log_dir, 'best.pkl')
model_file2=f"log/PDT_SeNet/unable3/S456_T7/Nov30_19-14-02/best.pkl"
print(f"model_file={model_file}")
print(f"os.path.exists(model_file)={os.path.exists(model_file)}")
print(f"model_file2={model_file2}")
print(f"os.path.exists(model_file2)={os.path.exists(model_file2)}")