You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
I am encountering a TypeError when attempting to unpickle a TensorFlow model that was previously saved using the pickle module. The model was pickled and is being unpickled in the same environment (Python 3.7, TensorFlow 2.9).
Code to Save the Model:
import pickle
with open('trained_height_map.pkl', 'wb') as f:
pickle.dump(autoencoder, f)
Code to Load the Model:
with open('trained_height_map.pkl', 'rb') as f:
autoencoder = pickle.load(f)
Error Encountered:
TypeError: '<' not supported between instances of 'dict' and 'float'
The error occurs specifically on the line where I try to load the model using pickle.load(f).
I would appreciate any insights or suggestions on how to resolve this error. Is there a known compatibility issue with TensorFlow models and pickle in this environment, or could there be something specific about the model that is causing this issue?
The text was updated successfully, but these errors were encountered:
Environment Details:
Python Version: 3.7
TensorFlow Version: 2.9
Problem:
I am encountering a TypeError when attempting to unpickle a TensorFlow model that was previously saved using the pickle module. The model was pickled and is being unpickled in the same environment (Python 3.7, TensorFlow 2.9).
Code to Save the Model:
Code to Load the Model:
Error Encountered:
TypeError: '<' not supported between instances of 'dict' and 'float'
The error occurs specifically on the line where I try to load the model using
pickle.load(f)
.I would appreciate any insights or suggestions on how to resolve this error. Is there a known compatibility issue with TensorFlow models and pickle in this environment, or could there be something specific about the model that is causing this issue?
The text was updated successfully, but these errors were encountered: