我尝试从keras运行下面的示例
但我得到了这个错误:
C:\Users\ANJALI\OneDrive\Desktop\Project\Minor Project\Minor_HelmetDetection\HelmetDetection>py HelmetDetection.py
2023-11-24 15:00:37.549028: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
WARNING:tensorflow:From C:\Users\ANJALI\AppData\Local\Programs\Python\Python311\Lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.
Traceback (most recent call last):
File "C:\Users\ANJALI\OneDrive\Desktop\Project\Minor Project\Minor_HelmetDetection\HelmetDetection\HelmetDetection.py", line 19, in <module>
from keras.utils.np_utils import to_categorical
ModuleNotFoundError: No module named 'keras.utils.np_utils'
字符串
我试着更新库,但仍然没有变化
1条答案
按热度按时间mf98qq941#
使用而不是下面的行,
字符串
代码:
型
它会成功的