求解答。。。。
没有解决的错误
util.cc:329
resource_variable_ops.py:1817
2021-06-14 19:48:01.485854: W tensorflow/python/util/util.cc:329] Sets are not currently considered sequences, but this may change in the future, so consider avoiding using them.
WARNING:tensorflow:From D:\LenovoQMDownload\ana\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py:1817: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
Traceback (most recent call last):
File "train_liveness.py", line 116, in <module>
plt.plot(np.arange(0, EPOCHS), H.history["acc"], label="train_acc")
KeyError: 'acc'
KeyError: ‘acc’、KeyError: ‘val_acc’
acc改为accuracy
val_acc改为val_accuracy
# plot the training loss and accuracy
plt.style.use("ggplot")
plt.figure()
plt.plot(np.arange(0, EPOCHS), H.history["loss"], label="train_loss")
plt.plot(np.arange(0, EPOCHS), H.history["val_loss"], label="val_loss")
plt.plot(np.arange(0, EPOCHS), H.history["accuracy"], label="train_acc")
plt.plot(np.arange(0, EPOCHS), H.history["val_accuracy"], label="val_accuracy")
plt.title("Training Loss and Accuracy on Dataset")
plt.xlabel("Epoch #")
plt.ylabel("Loss/Accuracy")
plt.legend(loc="lower left")
plt.savefig(args["plot"])
错误1 dso_loader.cc:44
I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
错误2
liveness.model生成文件夹,打开就是个垃圾。
Epoch 50/50
52/52 [==============================] - 0s 9ms/step - loss: 0.2215 - accuracy: 0.9193 - val_loss: 0.0077 - val_accuracy: 1.0000
[INFO] evaluating network...
precision recall f1-score support
fake 1.00 1.00 1.00 46
real 1.00 1.00 1.00 94
accuracy 1.00 140
macro avg 1.00 1.00 1.00 140
weighted avg 1.00 1.00 1.00 140
[INFO] serializing network to 'liveness.model'...
2021-06-14 20:08:46.713795: W tensorflow/python/util/util.cc:329] Sets are not currently considered sequences, but this may change in the future, so consider avoiding using them.
WARNING:tensorflow:From D:\LenovoQMDownload\ana\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py:1817: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
(base) C:\Users\lenovo\Desktop\liveness-detection-opencv>
版权声明:本文为qq_28117589原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。