File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2839,11 +2839,11 @@ def load_weights_from_hdf5_group(f, layers):
2839
2839
and weights file.
2840
2840
"""
2841
2841
if 'keras_version' in f .attrs :
2842
- original_keras_version = f .attrs ['keras_version' ]
2842
+ original_keras_version = f .attrs ['keras_version' ]. decode ( 'utf8' )
2843
2843
else :
2844
2844
original_keras_version = '1'
2845
2845
if 'backend' in f .attrs :
2846
- original_backend = f .attrs ['backend' ]
2846
+ original_backend = f .attrs ['backend' ]. decode ( 'utf8' )
2847
2847
else :
2848
2848
original_backend = None
2849
2849
@@ -2911,11 +2911,11 @@ def load_weights_from_hdf5_group_by_name(f, layers):
2911
2911
and weights file.
2912
2912
"""
2913
2913
if 'keras_version' in f .attrs :
2914
- original_keras_version = f .attrs ['keras_version' ]
2914
+ original_keras_version = f .attrs ['keras_version' ]. decode ( 'utf8' )
2915
2915
else :
2916
2916
original_keras_version = '1'
2917
2917
if 'backend' in f .attrs :
2918
- original_backend = f .attrs ['backend' ]
2918
+ original_backend = f .attrs ['backend' ]. decode ( 'utf8' )
2919
2919
else :
2920
2920
original_backend = None
2921
2921
You can’t perform that action at this time.
0 commit comments