lyhue1991/eat_pytorch_in_20_days

module 'pytorch_lightning.metrics' has no attribute 'functional'

as85207 opened this issue · 0 comments

6-2, 训练模型的3种方法
四,类风格 torchkeras.LightModel
line 33
acc = pl.metrics.functional.accuracy(preds, y)

报错如下:
AttributeError: module 'pytorch_lightning.metrics' has no attribute 'functional'