代码如下:
Traceback (most recent call last):
File "train.py", line 58, in
model.load_weights('model_data/ep003-loss5.451-val_loss4.962.h5', by_name=True, skip_mismatch=True)
File "/home/mist/.local/lib/python3.6/site-packages/keras/engine/topology.py", line 2647, in load_weights
with h5py.File(filepath, mode='r') as f:
File "/usr/local/lib/python3.6/dist-packages/h5py/_hl/files.py", line 408, in init
swmr=swmr)
File "/usr/local/lib/python3.6/dist-packages/h5py/_hl/files.py", line 173, 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 88, in h5py.h5f.open
RuntimeError: Can't decrement id ref count (unable to close file, errno = 5, error message = 'Input/output error')
Segmentation fault (core dumped)
请求各位大佬解决。
看看是不是存在并发读写文件的情况。
https://stackoverflow.com/questions/60428751/tensorflow-2-0-keras-save-model-to-hdfs-cant-decrement-id-ref-count