Simbert training stepping on the pit 2

报错:Traceback (most recent call last):
  File "stage2.py", line 206, in <module>
    roformer.load_weights("./best_model_2.weights")
  File "/output/.pylibs/lib/python3.6/site-packages/keras/engine/saving.py", line 492, in load_wrapper
    return load_function(*args, **kwargs)
  File "/output/.pylibs/lib/python3.6/site-packages/keras/engine/network.py", line 1230, in load_weights
    f, self.layers, reshape=reshape)
  File "/output/.pylibs/lib/python3.6/site-packages/keras/engine/saving.py", line 1183, in load_weights_from_hdf5_group
    original_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'

The problem is missing or the h5py version is wrong, and it can be solved in one sentence

pip install h5py==2.8.0 

Guess you like

Origin blog.csdn.net/qq_23953717/article/details/131676636