aai-institute / continuiti

Learning function operators with neural networks.
GNU Lesser General Public License v3.0
20 stars 3 forks source link

Fix: Transformations Not Properly Working When Moved to Device #118

Closed JakobEliasWagner closed 5 months ago

JakobEliasWagner commented 5 months ago

Fix: Transformations Not Properly Working When Moved to Device

Description

This pr introduces the torch tensor class Parameter to Transform classes. When moving nn.Module instances to device it only moves designated parameters to the device. Common torch.Tensor instances do not belong to this class. torch.nn.Parameter fixes this issue.

Which issue does this PR tackle?

How does it solve the problem?

How are the changes tested?

Checklist for Contributors

Checklist for Reviewers: