bubbliiiing / yolov4-tiny-pytorch

这是一个YoloV4-tiny-pytorch的源码,可以用于训练自己的模型。
MIT License
778 stars 185 forks source link

ValueError: Expected a symbolic Tensors or a callable for the loss value. Please wrap your loss computation in a zero argument `lambda`. #96

Open duncan1126 opened 2 years ago

duncan1126 commented 2 years ago

訓練時遇到以下錯誤 請問有相關經驗嗎 謝謝

Traceback (most recent call last): File "train.py", line 311, in layer.add_loss(l2(weight_decay)(layer.kernel)) File "D:\python37\lib\site-packages\keras\engine\base_layer.py", line 1585, in add_loss 'Expected a symbolic Tensors or a callable for the loss value. ' ValueError: Expected a symbolic Tensors or a callable for the loss value. Please wrap your loss computation in a zero argument lambda.


RTX3080 CUDA11.2 TENSORFLOW 2.8.0 KERAS 2.8.0

bubbliiiing commented 2 years ago

这事pytorch