JustinShenk / fer

Facial Expression Recognition with a deep neural network as a PyPI package
MIT License
338 stars 78 forks source link

ValueError: Tensor Tensor("conv2d_4/BiasAdd:0", shape=(?, ?, ?, 4), dtype=float32) is not an element of this graph. #35

Open abdullaholuk opened 2 years ago

abdullaholuk commented 2 years ago

Hi Sir, First of all, thank you for this great package.

I am using this package in Google Cloud Functions with tensorflow==2.4.1. When I use FER with mtcnn=True, I get this error:

File "/workspace/system/face_emotion_model_api.py", line 66, in face_emotion_model result = FER_MODEL.detect_emotions(image) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/fer/fer.py", line 225, in detect_emotions face_rectangles = self.find_faces(img, bgr=True) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/fer/fer.py", line 182, in find_faces results = self._mtcnn.detect_faces(img) ValueError: Tensor Tensor("conv2d_4/BiasAdd:0", shape=(?, ?, ?, 4), dtype=float32) is not an element of this graph.

Could you please help me?

JustinShenk commented 2 years ago

Hi Abdullah, thanks for your message. Is there any way I can reproduce this for testing?

On Wed, Oct 27, 2021 at 10:56 PM Abdullah Oluk @.***> wrote:

Hi Sir, First of all, thank for this great package.

I am using this package in Google Cloud Functions. When I use FER with mtcnn=True, I got this error:

File "/workspace/system/face_emotion_model_api.py", line 28, in predict predictions = face_emotion_model(image) File "/workspace/system/face_emotion_model_api.py", line 66, in face_emotion_model result = FER_MODEL.detect_emotions(image) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/fer/fer.py", line 225, in detect_emotions face_rectangles = self.find_faces(img, bgr=True) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/fer/fer.py", line 182, in find_faces results = self._mtcnn.detect_faces(img) ValueError: Tensor Tensor("conv2d_4/BiasAdd:0", shape=(?, ?, ?, 4), dtype=float32) is not an element of this graph.

Could you please help me?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/justinshenk/fer/issues/35, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZFY5EQCHHJROFC6GO3UJBYQHANCNFSM5G3I7G4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.