Skip to content
New issue

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

'Model' object has no attribute 'make_predict_function' #42

Open
linguist89 opened this issue Mar 26, 2022 · 10 comments
Open

'Model' object has no attribute 'make_predict_function' #42

linguist89 opened this issue Mar 26, 2022 · 10 comments

Comments

@linguist89
Copy link

I getting this error: 'Model' object has no attribute 'make_predict_function' and I took a look at the fer.py file in the repo. Line 117 has the following code self.__emotion_classifier.make_predict_function() but it doesn't seem like there is a make_predict_function() anywhere so I think that is causing the problem. Anyone else run into the same problem?

@JustinShenk
Copy link
Owner

JustinShenk commented Mar 26, 2022 via email

@linguist89
Copy link
Author

linguist89 commented Mar 27, 2022

I installed via "pip install -U fer" so it should be the latest version
This is the command I'm running in my Python script

img = cv2.imread("test.jpeg")
detector = FER()
detector.detect_emotions(img)

@JustinShenk
Copy link
Owner

Can you show the outputs of pip list?

@linguist89
Copy link
Author

Package Version


absl-py 1.0.0
anvil-uplink 0.3.42
astor 0.8.1
certifi 2021.10.8
charset-normalizer 2.0.12
cycler 0.11.0
fer 21.0.6
fonttools 4.31.2
future 0.18.2
gast 0.2.2
google-pasta 0.2.0
grpcio 1.44.0
h5py 2.10.0
idna 3.3
importlib-metadata 4.11.3
keras 2.8.0
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.2
kiwisolver 1.4.1
Markdown 3.3.6
matplotlib 3.5.1
mtcnn 0.1.1
numpy 1.21.5
opencv-contrib-python 4.5.5.64
opencv-python 4.5.5.64
opt-einsum 3.3.0
packaging 21.3
pandas 1.3.5
Pillow 9.0.1
pip 21.2.4
protobuf 3.19.4
pyparsing 3.0.7
python-dateutil 2.8.2
pytz 2022.1
requests 2.27.1
setuptools 57.5.0
six 1.16.0
tensorboard 1.15.0
tensorflow 1.15.2
tensorflow-estimator 1.15.1
termcolor 1.1.0
tqdm 4.63.1
typing_extensions 4.1.1
urllib3 1.26.9
Werkzeug 2.0.3
wheel 0.37.1
wrapt 1.14.0
ws4py 0.5.1
zipp 3.7.0

@linguist89
Copy link
Author

I'm running it on a Docker container, so I'm not sure if that could be a problem.

@JustinShenk
Copy link
Owner

JustinShenk commented Mar 31, 2022 via email

@linguist89
Copy link
Author

I've updated now to 22.4.0 and the Docker container is running fine, but it still gives me the error: 'Model' object has no attribute 'make_predict_function'

@JustinShenk
Copy link
Owner

JustinShenk commented Apr 3, 2022 via email

@nicolas-gaude
Copy link

nicolas-gaude commented Apr 5, 2022

it seems that the tensorflow.python.keras.engine.training.Model object has deprecated the "make_predict_function()" into "_make_predict_function()" (at least with tensorflow > 1.15.0)

@JustinShenk
Copy link
Owner

JustinShenk commented Apr 6, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants