Jittor / jittor

Jittor is a high-performance deep learning framework based on JIT compiling and meta-operators.
https://cg.cs.tsinghua.edu.cn/jittor/
Apache License 2.0
3.08k stars 311 forks source link

希望CrossEntropyLoss能够加入logits选项或者doc提醒 #306

Open Meidozuki opened 2 years ago

Meidozuki commented 2 years ago

Expected behavior

刚刚在把tf模型转jittor时碰到一个十分头痛的bug,试了一天之后看源码发现是模型和交叉熵都过了一次softmax导致的bug torch和jittor现在的接口是BCE无softmax,BCEWithLogitsLoss带softmax,但CE又带softmax,有误导性。(希望后人不要重蹈覆辙了orz)

Jittor commented 2 years ago

收到,谢谢反馈😁我们检查下

---原始邮件--- 发件人: @.> 发送时间: 2022年4月2日(周六) 晚上11:34 收件人: @.>; 抄送: @.***>; 主题: [Jittor/jittor] 希望CrossEntropyLoss能够加入logits选项或者doc提醒 (Issue #306)

Expected behavior

刚刚在把tf模型转jittor时碰到一个十分头痛的bug,试了一天之后看源码发现是模型和交叉熵都过了一次softmax导致的bug torch和jittor现在的接口是BCE无softmax,BCEWithLogitsLoss带softmax,但CE又带softmax,有误导性。(希望后人不要重蹈覆辙了orz)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

cjld commented 2 years ago

请问您指的是这三个接口吗:

目前jittor的接口和torch保持兼容,我们将进一步完善文档,谢谢您的反馈

Meidozuki commented 2 years ago

请问您指的是这三个接口吗:

  • CrossEntropyLoss
  • BCEWithLogitsLoss
  • BCELoss

目前jittor的接口和torch保持兼容,我们将进一步完善文档,谢谢您的反馈

是的,是这3个接口