0

The problem of the thickness variable being ineffective when using torch for optimization

Nan Steve
Nan Steve
@stevenan
28 days ago
75
1

I found that when using the** Torch backend** for optimization, when adding multiple thickness variables with problem.add_variable, usually only one is effective. And the other geometry properties remain unaffected. Additionally, directly changing lens.surfaces.surfaces[n].thickness to a tensor also cannot participate in gradient updates, while the geometry attribute does not have this issue.Is this due to my mistake or a bug?

Discussion 1

Hello,

Thanks for reporting this. This was a bug, but it is fixed as of today, May 13, 2026. See PR #569 on GitHub for the details. So, please check out the latest version of the code and try again.

Regards, Kramer

Join the conversation

You need to be signed in to leave a comment.

Sign in to comment