kaanaksit / odak

Scientific computing library for optics, computer graphics and visual perception.
https://kaanaksit.com/odak
Mozilla Public License 2.0
176 stars 52 forks source link

Migrating learn submodule to pytorch 1.8.0 #6

Closed askaradeniz closed 3 years ago

askaradeniz commented 4 years ago

Currently, some methods used in the learn submodule uses external functions for some operations. The current list of these functions is as the following:

These functions are included in fft module in pytorch 1.8.0. We can update these functions when pytorch 1.8.0 becomes stable.

kaanaksit commented 4 years ago

As a side note and a future reminder, starting from 1.8.0, torch will have a new [torch.fft submodule]() as indicated in these warnings from torch 1.7.0:

UserWarning: The function torch.ifft is deprecated and will be removed in a future PyTorch release. Use the new torch.fft module functions, instead, by importing torch.fft and calling torch.fft.ifft or torch.fft.ifftn.

UserWarning: The function torch.fft is deprecated and will be removed in PyTorch 1.8. Use the new torch.fft module functions, instead, by importing torch.fft and calling torch.fft.fft or torch.fft.fftn.
kaanaksit commented 3 years ago

also fftn has to be replaced with fft2 in the future.

kaanaksit commented 3 years ago

Odak has a new brach called torch_1_8_0 in which odak/learn/wave/toolkit.py is removed and routines are updated for Torch 1.8.0.

kaanaksit commented 3 years ago

Torch 1.8.0, first release candidate is announced 2-3 days ago. We should expect to have the new torch in the next 20-30 days. Then I will be able to merge and close this issue.

kaanaksit commented 3 years ago

3123057e687e86c9882bbce5e8568be5da4fecb6 resolves the case.