Skip to content

dtype issue fix for insertion and additional checks #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 30, 2025

Conversation

McHaillet
Copy link
Contributor

list of changes:

  • added a valuerror check in case values and image for insertion do not have the same dtype
  • added explicit dtype for weights allocation in linear insertion
  • convert weight to data dtype in insertion to prevent upcasting but allow flexible weights -- this allows running with a weight tensor of float64 while the data dtype is complex64, makes input to the function the least error prone I think
  • added tests to check for dtype and ensure valueerror is raised

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@McHaillet
Copy link
Contributor Author

@alisterburt I am only a bit uncertain about the type casting of the w tensor -- maybe not the neatest solution but we can always adapt later. If the tensor is already correct type thought it just returns self.

@McHaillet McHaillet merged commit eb6c388 into teamtomo:main Apr 30, 2025
5 checks passed
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