aai-institute / continuiti

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

Transformations Not Properly Working When Moved to Device #117

Closed JakobEliasWagner closed 3 months ago

JakobEliasWagner commented 3 months ago

Description

When moving tensors to a device using .to(device), the module is moved to the device, while tensors withing the Transformation remain on the cpu.

Instead relevant tensors should be torch.nn.Parameter objects, as these are designed to be associated with a module and correctly moved to a device alongside the module. This approach should ensure that all transformations and operations perform correctly post-device transfer.