lettucecfd / lettuce

Computational Fluid Dynamics based on PyTorch and the Lattice Boltzmann Method
MIT License
222 stars 39 forks source link

convert_to_tensor raises strong warning in torch #181

Closed PhiSpel closed 3 months ago

PhiSpel commented 4 months ago

when convert_to_tensor receives a tensor, torch.tensor(tensor, ...) is called. This raises an error, as the tensor is copied, which may be undesirable. In this case, torch.to() should be called with the device and dtype.