问题描述
我想只是出于娱乐目的而使用FER,但在我安装它之后,我试图运行示例代码,并且遇到了这个错误,请受过更多教育的人可以帮助我。
最新的Tensorflow版本, Windows 10专业版, Python 3.8.6 64位
https://github.com/justinshenk/fer
https://github.com/justinshenk/fer/blob/master/example.py
WARNING:tensorflow:From C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\tensorflow\python\compat\v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
WARNING:tensorflow:From C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\tensorflow\python\keras\engine\training_v1.py:2070: Model.state_updates (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.
Instructions for updating:
This property should not be used in TensorFlow 2.0,as updates are applied automatically.
23-10-2020:22:29:59,746 WARNING [deprecation.py:317] From C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\tensorflow\python\keras\engine\training_v1.py:2070: Model.state_updates (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.
Instructions for updating:
This property should not be used in TensorFlow 2.0,as updates are applied automatically.
Traceback (most recent call last):
File "C:\Users\perlu\Desktop\benj.py",line 8,in <module>
result = detector.detect_emotions(image)
File "C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\fer\fer.py",line 236,in detect_emotions
face_rectangles = self.find_faces(img,bgr=True)
File "C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\fer\fer.py",line 194,in find_faces
results = self._mtcnn.detect_faces(img)
File "C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\mtcnn\mtcnn.py",line 302,in detect_faces
result = stage(img,result[0],result[1])
File "C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\mtcnn\mtcnn.py",line 342,in __stage1
out = self._pnet.predict(img_y)
File "C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\tensorflow\python\keras\engine\training_v1.py",line 983,in predict
return func.predict(
File "C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\tensorflow\python\keras\engine\training_arrays.py",line 708,in predict
return predict_loop(
File "C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\tensorflow\python\keras\engine\training_arrays.py",line 386,in model_iteration
batch_outs = f(ins_batch)
File "C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\tensorflow\python\keras\backend.py",line 3824,in __call__
fetched = self._callable_fn(*array_vals,File "C:\Users\perlu\AppData\Roaming\Python\python38\site-packages\tensorflow\python\client\session.py",line 1470,in __call__
ret = tf_session.TF_Sessionruncallable(self._session._session,tensorflow.python.framework.errors_impl.UnkNownError: 2 root error(s) found.
(0) UnkNown: Failed to get convolution algorithm. This is probably because cuDNN Failed to initialize,so try looking to see if a warning log message was printed above.
[[{{node conv2d/Conv2D}}]]
[[conv2d_4/BiasAdd/_783]]
(1) UnkNown: Failed to get convolution algorithm. This is probably because cuDNN Failed to initialize,so try looking to see if a warning log message was printed above.
[[{{node conv2d/Conv2D}}]]
0 successful operations.
0 derived errors ignored.
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)