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

关于jittor 设备和梯度的疑问 #296

Open x54-729 opened 2 years ago

x54-729 commented 2 years ago

您好!我在使用jittor后有一些疑问,希望可以得到解答

  1. 请问在jittor中是否有获取当前Var所在设备的方法?
  2. 在jittor中是否可以手动设置Var的requires_grad属性?我试过直接通过a.requires_grad=Truea = a.start_grad()这样的方法来设置,但是都无法改变requires_grad属性
Jittor commented 2 years ago

感谢您的反馈,目前jittor通过jt.flags.use_cuda 来全局控制变量所在设备,关于问题2,requires_grad是可以使用的,您可以检查是否使用了int变量,导致无法开启梯度

---原始邮件--- 发件人: @.> 发送时间: 2022年3月9日(周三) 下午4:16 收件人: @.>; 抄送: @.***>; 主题: [Jittor/jittor] 关于jittor 设备和梯度的疑问 (Issue #296)

您好!我在使用jittor后有一些疑问,希望可以得到解答

请问在jittor中是否有获取当前Var所在设备的方法?

在jittor中是否可以手动设置Var的requires_grad属性?我试过直接通过a.requires_grad=True或a = a.start_grad()这样的方法来设置,但是都无法改变requires_grad属性

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.Message ID: @.***>