【问题标题】:OSError: Unable to create file (unable to open file: name = <filepath>, errno = 13, error message = 'Permission denied', flags = 13, o_flags = 302)OSError:无法创建文件(无法打开文件:name = <filepath>,errno = 13,错误消息 = 'Permission denied',flags = 13,o_flags = 302)
【发布时间】:2020-12-21 21:52:47
【问题描述】:

我不明白我错过了什么...... 我使用 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)

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

【问题讨论】:

  • 尝试使用model_just_name + "/model.h5"或检查test_data_pros是否存在:)

标签: python tensorflow keras


【解决方案1】:

请管理员授予您对“D:\test_data_pros\restructured”的访问权限

【讨论】:

  • 所以你认为错误不在于我的代码?当使用带有 Tensorflow 2.3.0 的 Keras 2.4.3 时,一切正常。但是对于我目前尝试做的事情,我需要上面列出的版本。
  • @Pm740 请相应地编辑您的答案
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-06-21
  • 1970-01-01
  • 1970-01-01
  • 2018-03-14
  • 2019-01-11
  • 2016-08-07
相关资源
最近更新 更多