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

Feature/user choice sample tensor #172

Merged
merged 121 commits into from
Dec 19, 2023
Merged

Conversation

michele-milesi
Copy link
Member

Summary

Describe the purpose of the pull request, including:

  • Added the buffer.from_numpy parameter to let the user decide which function to use to convert Numpy arrays into PyTorch tensors when the to_tensor() and sample_tensors() functions are called.
    In particular, it is used the torch.from_numpy() function when buffer.from_numpy=True, otherwise the torch.as_tensor() function.

Type of Change

Please select the one relevant option below:

  • New feature (non-breaking change that adds functionality)

Checklist

Please confirm that the following tasks have been completed:

  • I have tested my changes locally and they work as expected. (Please describe the tests you performed.)
  • I have added unit tests for my changes, or updated existing tests if necessary.
  • I have updated the documentation, if applicable.
  • I have installed pre-commit and run locally for my code changes.

belerico and others added 30 commits October 5, 2023 22:01
@belerico belerico merged commit b437994 into main Dec 19, 2023
10 checks passed
@michele-milesi michele-milesi deleted the feature/user-choice-sample_tensor branch December 19, 2023 11:18
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