为什么会出现这个错误“OSError: Unable to open file (truncated file: eof = 4808704, sblock->base_addr = 0, stored_eof = 9406464)”?

问题描述

'''
    WARNING:tensorflow:`input_shape` is undefined or non-square,or `rows` is not in [96,128,160,192,224].
     Weights for input shape (224,224) will be loaded as the default.
    Traceback (most recent call last):
     File "E:\folder penting\tugas kuliah\prepare skripsi\PROTO\traning_mask_detector.py",line 61,in <module>
       baseModel = MobileNetV2(weights="imagenet",include_top=False,input_tensor=Input(shape=(224,224,3)))
      File "C:\Users\Yoyok\AppData\Roaming\Python\python37\site- 
   packages\tensorflow\python\keras\applications\mobilenet_v2.py",line 417,in MobileNetV2
model.load_weights(weights_path)
   File "C:\Users\Yoyok\AppData\Roaming\Python\python37\site- 
packages\tensorflow\python\keras\engine\training.py",line 2319,in load_weights
  with h5py.File(filepath,'r') as f:
   File "C:\Users\Yoyok\AppData\Roaming\Python\python37\site-packages\h5py\_hl\files.py",line 
  427,in __init__
swmr=swmr)
    File "C:\Users\Yoyok\AppData\Roaming\Python\python37\site-packages\h5py\_hl\files.py",line 190,in make_fid
      fid = h5f.open(name,flags,fapl=fapl)
     File "h5py\_objects.pyx",line 54,in h5py._objects.with_phil.wrapper
     File "h5py\_objects.pyx",line 55,in h5py._objects.with_phil.wrapper
    File "h5py\h5f.pyx",line 96,in h5py.h5f.open
  OSError: Unable to open file (truncated file: eof = 4808704,sblock->base_addr = 0,stored_eof = 9406464)'''

它发生在我运行代码时,在此之前我可以训练模型没问题,但在我再试之后,这显示

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...