在 PyTorch 中,计算损失时将 output
和 target
作为参数传递给损失函数 (criterion
) 的顺序是 criterion(output, target)
。这种顺序在大多数情况下是约定俗成的,并且符合大多数损失函数的参数顺序要求。
07-02
2597
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-27
1947
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-06
8669
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-07
244
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交