Skip to content

Optimizer precision - #135

Open
benikm91 wants to merge 2 commits into
dimwit-dev:mainfrom
benikm91:optimizer-precision
Open

Optimizer precision#135
benikm91 wants to merge 2 commits into
dimwit-dev:mainfrom
benikm91:optimizer-precision

Conversation

@benikm91

Copy link
Copy Markdown
Collaborator

No description provided.

@benikm91
benikm91 requested a review from marcelluethi July 21, 2026 21:19
@benikm91
benikm91 marked this pull request as draft July 21, 2026 21:20
@benikm91
benikm91 removed the request for review from marcelluethi July 21, 2026 21:20
@benikm91

Copy link
Copy Markdown
Collaborator Author

@marcelluethi As discussed today, I will add tests before we merge.

@marcelluethi

Copy link
Copy Markdown
Contributor

Thanks for implementing this. This looks like a very good solution to me.

@benikm91
benikm91 force-pushed the optimizer-precision branch from eac7a09 to b9f60f1 Compare July 31, 2026 08:23
@benikm91
benikm91 marked this pull request as ready for review August 1, 2026 09:55
@benikm91
benikm91 requested a review from marcelluethi August 1, 2026 09:55
def --![P](p1: P)(using TensorTree[P], FloatTree[P, V]): P = Tensor0(VType[V])(p2) --! p1
def **![P](p1: P)(using TensorTree[P], FloatTree[P, V]): P = Tensor0(VType[V])(p2) **! p1
def `//!`[P](p1: P)(using TensorTree[P], FloatTree[P, V]): P = Tensor0(VType[V])(p2) `//!` p1

@marcelluethi marcelluethi Aug 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this not be confusing on single tensors, as they are both tensor trees and tensors and consequently will have +, +! and ++!. Another problem might be that ! usually indicates broadcasting and has here a different meaning.

@marcelluethi marcelluethi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. I think it is now the right way to handle the precision of the optimizers. I also like the optimizer parameters are just Double and hence easy to fix. The only thing I am not sure about are the !++ extension methods. However, I am fine with merging if this is not an accident but a conscious decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants