'How to solve No module named 'keras.saving.pickle_utils' error?

import numpy as np
import cv2
import pickle
 
frameWidth= 640         # CAMERA RESOLUTION
frameHeight = 480
brightness = 180
threshold = 0.75         # PROBABLITY THRESHOLD
font = cv2.FONT_HERSHEY_SIMPLEX

 
# SETUP THE VIDEO CAMERA
cap = cv2.VideoCapture(0)
cap.set(3, frameWidth)
cap.set(4, frameHeight)
cap.set(10, brightness)
# IMPORT THE TRANNIED MODEL
pickle_in=open("model_trained.p","rb")
model=pickle.load(pickle_in)

this gives me this error: ModuleNotFoundError: No module named 'keras.saving.pickle_utils' How to solve it?

P.S: I'm trying to run this code on raspberry pi 3. I've installed tensorflow and its packages and tried to import tensorflow and keras, and I did not face any problem.



Solution 1:[1]

Unfortunately, it doesn't seem like it, unless there's an unofficial implementation out there: https://github.com/near/borsh#implementations

On the other hand, it could be an excellent open-source project if you implement it!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jon C