Tensorflow -> Pytorch
Tensorflow | Pytorch |
---|---|
sigmoid_cross_entropy_with_logits | BCEWithLogitsLoss |
tf.nn.sigmoid_cross_entropy_with_logits 与 torch.nn.BCEWithLogitsLossl在数值上完全一致,已验证。
to do:
添加更多算子,和框架
参考资料
https://discuss.pytorch.org/t/equivalent-of-tensorflows-sigmoid-cross-entropy-with-logits-in-pytorch/1985/12
Pytorch docs BECWithLogitsLoss