OSError:无法创建文件(无法打开文件:name=<filepath>,errno=13,错误消息='Permission denied',flags=13,o_flags=302)

2024-10-01 07:44:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我不明白我错过了什么。。。 我使用Tensorflow gpu 2.0.0、Keras gpu 2.3.1、numpy 1.16.6、h5py 2.9.0、python 3.7.9。 以下是我尝试保存模型的方式:

model_just_name = 'LSTM_FA_SpGyZ_out1_6d_dno_seq_b_p_tmm'
filepath = r'D:\test_data_pros\restructured'

model.save(model_just_name + "model.h5",
           filepath=filepath,
           overwrite=True,
           include_optimizer=True)

编辑: 当Keras 2.4.3与Tensorflow 2.3.0或Keras 2.3.1与Tensorflow 2.1.0配合使用时,一切正常。但是对于我目前尝试做的事情,我需要上面列出的版本


Tags: name模型numpytruemodelgputensorflow方式