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 support for a batch transforms to method #3875

Merged
merged 2 commits into from Feb 15, 2023

Conversation

warner-benjamin
Copy link
Collaborator

This PR modifies TfmdDL.to to support calling a to method on batch transforms as an alternate means of moving the transform to a device. The current approach of looking for PyTorch Parameters and calling to doesn't work for moving nn.Module based transforms such as Torchaudio's AmplitudeToDB.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@warner-benjamin
Copy link
Collaborator Author

I missed that TabularPandas and tabular Batch Transforms set to as an object, so my followup commit should be compatible with TabularPandas.

@jph00 jph00 merged commit 9a2c1b7 into fastai:master Feb 15, 2023
@jph00
Copy link
Member

jph00 commented Feb 15, 2023

Good idea :)

@warner-benjamin warner-benjamin deleted the transform_to branch February 27, 2023 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants