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.
訓練時遇到以下錯誤 請問有相關經驗嗎 謝謝
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