print('* Acc@1 {top1.global_avg:.3f} Acc@5 {top5.global_avg:.3f} loss_cls {losses_cls.global_avg:.3f} los其中top1.global_avg减5输出
时间: 2023-11-27 20:51:28 浏览: 155
我用python写的print输出
以下是代码示例:
```python
top1_diff = top1.global_avg - top5.global_avg
print('* Acc@1 {:.3f} Acc@5 {:.3f} ({:.3f} difference) loss_cls {:.3f} loss'.format(top1.global_avg, top5.global_avg, top1_diff, losses_cls.global_avg))
```
该代码会输出类似以下内容:
```
* Acc@1 0.723 Acc@5 0.912 (0.189 difference) loss_cls 0.832 loss
```
阅读全文