ValueError: Cannot create group in read only mode.


原文链接:http://www.one2know.cn/bug7/

  • 报错
Using TensorFlow backend.
Traceback (most recent call last):
  File "D:/PyCharm 5.0.3/WorkSpace/3.Keras/2.Application中五款已训练模型、VGG16框架(Sequential式、Model式)解读/1.py", line 8, in <module>
    model = load_model(r'..\Model\resnet50_weights_tf_dim_ordering_tf_kernels.h5','rw')
  File "D:\Anaconda3\lib\site-packages\keras\engine\saving.py", line 419, in load_model
    model = _deserialize_model(f, custom_objects, compile)
  File "D:\Anaconda3\lib\site-packages\keras\engine\saving.py", line 221, in _deserialize_model
    model_config = f['model_config']
  File "D:\Anaconda3\lib\site-packages\keras\utils\io_utils.py", line 302, in __getitem__
    raise ValueError('Cannot create group in read only mode.')
ValueError: Cannot create group in read only mode.
  • 原因
    单纯的没有结构一个model不能导入那么多参数
  • 解决
    model = AModel(weights=r'模型的路径\model_name.h5')
    也可以:
    先加载model的layers,再加载模型


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 ValueError: must have exactly one of create/read/write/append mode hadoop mkdir: Cannot create directory /usr. Name node is in safe mode. hadoop上传文件失败报错(put: Cannot create file/eclipse.desktop._COPYING_. Name node is in safe mode.) bash: cannot create temp file for here-document: Read-only file system create-react-app 遇到问题 TypeError: Cannot assign to read only property 'jsx' of object '#' ValueError: Could not find a format to read the specified file in mode 'i' cannot edit in read-only editor 彻底解决sql_mode=only_full_group_by MySQL报错this is incompatible with sql_mode=only_full_group_by laravel sql mode only_full_group_by 解决小记
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM