0

This is an error i am getting on spyder 5.0.3

File "C:\Users\HP\anaconda3\lib\site-packages\tensorflow\python\keras\layers\core.py", line 1057, in _parse_function_from_config function = generic_utils.func_load(

File "C:\Users\HP\anaconda3\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py", line 457, in func_load code = marshal.loads(raw_code)

ValueError: bad marshal data (unknown type code)

library-versions: enter image description here

I have tried downgrading my libraries.. but nothing has happened

import tensorflow as tf
from tensorflow import keras


model_path = 'facenet_keras.h5'
#model = load_model(model_path)

#model = tf.keras.models.load_model(model_path)

#model = keras.models.load_model(model_path)

tf.keras.models.load_model(
    model_path, custom_objects=None, compile=True, options=None
)

tried all this!

mpromonet
  • 11,326
  • 43
  • 62
  • 91
Ashir Ali
  • 13
  • 3
  • This doesn't seem to be related to `tensorflow`. [This](https://stackoverflow.com/questions/30861493/how-to-fix-python-valueerrorbad-marshal-data) might be related. I suggest you to force a reinstall of setuptools in your Anaconda environment. – ibarrond Jun 15 '21 at 19:00
  • Where did you get the facenet model from? – Dr. Snoopy Jun 15 '21 at 19:52
  • I have tried to reinstall setup tools but nothing happened... and to answer the second question here is the link to the model https://drive.google.com/drive/folders/12aMYASGCKvDdkygSv1yQq8ns03AStDO_ – Ashir Ali Jun 15 '21 at 23:04

0 Answers0