Skip to content
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

Add scalar support to TensorCollection #799

Merged
merged 12 commits into from
Jul 10, 2023

Conversation

nkoppel
Copy link
Contributor

@nkoppel nkoppel commented Jun 28, 2023

Currently, adds infrastructure to use scalar values with the TensorCollection system. Resolves #485. A limitation of this is that boolean attributes cannot be used, as bool does not implement num_traits::NumCast. Currently, the only way to use bool attributes is to transmute from &bool to &u8, as doing &(b as u8) causes lifetime issues.

@nkoppel nkoppel marked this pull request as draft June 28, 2023 23:00
@nkoppel nkoppel changed the title Add hyperparameter support to TensorCollection Add scalar support to TensorCollection Jun 28, 2023
@nkoppel nkoppel marked this pull request as ready for review June 29, 2023 00:14
Copy link
Owner

@coreylowman coreylowman left a comment

Choose a reason for hiding this comment

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

Nice updates, thanks for this 🚀

@coreylowman coreylowman merged commit c161811 into coreylowman:main Jul 10, 2023
4 checks passed
@nkoppel nkoppel deleted the serialize_optimizers branch July 11, 2023 00:55
This pull request was closed.
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.

Non-tensor attributes of nn objects are not saved by SaveToNpz/LoadFromNpz
2 participants