We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#from keras_vggface.vggface import VGGFace
#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)
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:
This seems to be an issue with the upgrade to tensorflow 2.0
https://stackoverflow.com/questions/58574610/python3-recognizes-tensorflow-but-doesnt-recognize-any-of-its-attributes
I can see what the problem is, but i'm not sure how to rectify it.
Sorry, something went wrong.
There is an open PR that should fix some of these.
I solved this in this way: (tested multiple time on different machines)
pip install 'h5py==2.10.0' --force-reinstall
No branches or pull requests
#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: