How to inverse some scene params using pytorch? #308
Answered
by
Speierers
owaranainatsu
asked this question in
Q&A
-
Based on the tutorial, I want to use pytorch to implement it but I am confused about how to expose a scene parameter to the PyTorch optimizer in mitsuba3, like the codes shown here. I tried that using the following codes .
And I got the error message:
|
Beta Was this translation helpful? Give feedback.
Answered by
Speierers
Oct 5, 2022
Replies: 1 comment 1 reply
-
In your case, you need to be more careful when converting the tensor argument of You will likely need to use something like this to make it work: params[key] = dr.unravel(mi.Color3f, r.array) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
owaranainatsu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In your case, you need to be more careful when converting the tensor argument of
render_torch
into aColor3f
object. See this issue for more detailed information.You will likely need to use something like this to make it work: