-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'str' object has no attribute 'decode' #179
Comments
This seems to be an issue with the upgrade to tensorflow 2.0 I can see what the problem is, but i'm not sure how to rectify it. |
There is an open PR that should fix some of these. |
I solved this in this way: (tested multiple time on different machines)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#from keras_vggface.vggface import VGGFace
VGGFace ResNet50
#vggface = VGGFace(include_top=False, model='resnet50', input_shape=(224, 224, 3))'
from colab_demo.vggface_models import RESNET50
vggface = RESNET50(include_top=False, weights=None, input_shape=(224, 224, 3))
vggface.load_weights("rcmalli_vggface_tf_notop_resnet50.h5")
#from keras.applications.resnet50 import ResNet50
#vggface = ResNet50(include_top=False, input_shape=(224, 224, 3))
#vggface.summary()
model.build_pl_model(vggface_model=vggface, before_activ=loss_config["PL_before_activ"])
model.build_train_functions(loss_weights=loss_weights, **loss_config)
Error:
AttributeError Traceback (most recent call last)
in ()
6 from colab_demo.vggface_models import RESNET50
7 vggface = RESNET50(include_top=False, weights=None, input_shape=(224, 224, 3))
----> 8 vggface.load_weights("rcmalli_vggface_tf_notop_resnet50.h5")
9
10 #from keras.applications.resnet50 import ResNet50
1 frames
/usr/local/lib/python3.7/dist-packages/keras/engine/topology.py in load_weights_from_hdf5_group(f, layers, reshape)
3326 """
3327 if 'keras_version' in f.attrs:
-> 3328 original_keras_version = f.attrs['keras_version'].decode('utf8')
3329 else:
3330 original_keras_version = '1'
AttributeError: 'str' object has no attribute 'decode'
The text was updated successfully, but these errors were encountered: