Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 我能';不要让FER使用示例代码_Python_Python 3.x_Tensorflow_Face Recognition - Fatal编程技术网

Python 我能';不要让FER使用示例代码

Python 我能';不要让FER使用示例代码,python,python-3.x,tensorflow,face-recognition,Python,Python 3.x,Tensorflow,Face Recognition,我想使用FER只是为了好玩和修补,但在我安装了它之后,我正在尝试运行示例代码,我遇到了这个错误,请受过更多教育的人帮助我 最新的Tensorflow版本, Windows 10 Pro, Python 3.8.6 64位 警告:tensorflow:From C:\Users\perlu\AppData\Roaming\Python\Python38\site packages\tensorflow\Python\compat\v2\u compat.py:96:disable\u reso

我想使用FER只是为了好玩和修补,但在我安装了它之后,我正在尝试运行示例代码,我遇到了这个错误,请受过更多教育的人帮助我

最新的Tensorflow版本, Windows 10 Pro, Python 3.8.6 64位

警告:tensorflow:From C:\Users\perlu\AppData\Roaming\Python\Python38\site packages\tensorflow\Python\compat\v2\u compat.py:96:disable\u resource\u变量(来自tensorflow.Python.ops.variable\u范围)已被弃用,并将在未来版本中删除。
更新说明:
长期不支持非资源变量
警告:tensorflow:From C:\Users\perlu\AppData\Roaming\Python\Python38\site packages\tensorflow\Python\keras\engine\training\u v1.py:2070:Model.state\u更新(来自tensorflow.Python.keras.engine.training)已被弃用,并将在未来版本中删除。
更新说明:
此属性不应在TensorFlow 2.0中使用,因为会自动应用更新。
23-10-2020:22:29:59746来自C:\Users\perlu\AppData\Roaming\Python\Python38\site packages\tensorflow\Python\keras\engine\training\u v1.py:2070:Model.state\u更新(来自tensorflow.Python.keras.engine.training)已被弃用,并将在未来版本中删除。
更新说明:
此属性不应在TensorFlow 2.0中使用,因为会自动应用更新。
回溯(最近一次呼叫最后一次):
文件“C:\Users\perlu\Desktop\benj.py”,第8行,在
结果=检测器。检测情绪(图像)
文件“C:\Users\perlu\AppData\Roaming\Python38\site packages\fer\fer.py”,第236行,位于detect\u
面矩形=自身。查找面(img,bgr=True)
文件“C:\Users\perlu\AppData\Roaming\Python38\site packages\fer\fer.py”,第194行,在find\u faces中
结果=自我检测面部(img)
文件“C:\Users\perlu\AppData\Roaming\Python38\site packages\mtcnn\mtcnn.py”,第302行,位于detect\u faces中
结果=阶段(img,结果[0],结果[1])
文件“C:\Users\perlu\AppData\Roaming\Python38\site packages\mtcnn\mtcnn.py”,第342行,在第1阶段
out=自我预测(img_y)
文件“C:\Users\perlu\AppData\Roaming\Python38\site packages\tensorflow\Python\keras\engine\training\u v1.py”,第983行,在predict中
返回函数(
文件“C:\Users\perlu\AppData\Roaming\Python38\site packages\tensorflow\Python\keras\engine\training\u arrays.py”,第708行,在predict中
返回预测环(
模型迭代中的文件“C:\Users\perlu\AppData\Roaming\Python38\site packages\tensorflow\Python\keras\engine\training\u arrays.py”,第386行
批量输出=f(批量输入)
文件“C:\Users\perlu\AppData\Roaming\Python38\site packages\tensorflow\Python\keras\backend.py”,第3824行,在调用中__
fetched=self.\u可调用\u fn(*数组\u值,
文件“C:\Users\perlu\AppData\Roaming\Python38\site packages\tensorflow\Python\client\session.py”,第1470行,在调用中__
ret=tf_session.tf_SessionRunCallable(self.\u session.\u session,
tensorflow.python.framework.errors\u impl.UnknownError:找到2个根错误。
(0)未知:无法获取卷积算法。这可能是因为cuDNN未能初始化,因此请尝试查看上面是否打印了警告日志消息。
[{{node conv2d/conv2d}}]]
[[conv2d_4/BiasAdd/_783]]
(1) 未知:无法获取卷积算法。这可能是因为cuDNN未能初始化,因此请尝试查看上面是否打印了警告日志消息。
[{{node conv2d/conv2d}}]]
0成功的操作。
忽略0个派生错误。
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.