fer
fer copied to clipboard
'Model' object has no attribute 'make_predict_function'
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?
Which version FER are you using, what command did you run?
On Sat, Mar 26, 2022 at 11:39 PM linguist89 @.***> wrote:
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?
— Reply to this email directly, view it on GitHub https://github.com/justinshenk/fer/issues/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZE3RTRQHA2EDRC5HLDVB6GZXANCNFSM5RXY56ZQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
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)
Can you show the outputs of pip list
?
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
I'm running it on a Docker container, so I'm not sure if that could be a problem.
The FER version there is 21.0.6
. Maybe update the FER, the latest version
is 22.4.0.
On Wed, Mar 30, 2022 at 9:41 PM linguist89 @.***> wrote:
I'm running it on a Docker container, so I'm not sure if that could be a problem.
— Reply to this email directly, view it on GitHub https://github.com/justinshenk/fer/issues/42#issuecomment-1083551576, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZAN7HEKY3WRI6KI6C3VCSU6RANCNFSM5RXY56ZQ . You are receiving this because you commented.Message ID: @.***>
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'
Can you share a minimal reproducible example? I can't reproduce this on my side.
On Thu, Mar 31, 2022 at 12:01 PM linguist89 @.***> wrote:
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'
— Reply to this email directly, view it on GitHub https://github.com/justinshenk/fer/issues/42#issuecomment-1084357101, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZHX3RRWY3DXKU3RSETVCVZWLANCNFSM5RXY56ZQ . You are receiving this because you commented.Message ID: @.***>
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)
It seems to be rather the opposite, _make_predict_function is deprecated: https://www.tensorflow.org/api_docs/python/tf/keras/Model - thus your tensorflow version is somehow older. If you can share a minimal example I can look closer at it.
On Tue, Apr 5, 2022 at 6:22 PM nicolas gaude @.***> wrote:
it seems that the tensorflow.python.keras.engine.training.Model object has no deprecated the "make_predict_function()" into "_make_predict_function()" (at least with tensorflow > 1.15.0)
— Reply to this email directly, view it on GitHub https://github.com/justinshenk/fer/issues/42#issuecomment-1088969038, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZHHNTQMGXDSOKONCU3VDRSEPANCNFSM5RXY56ZQ . You are receiving this because you commented.Message ID: @.***>