Open
Description
Hello Author, you mentioned that to apply PDEPreprocessing()
to the dataset, we can set the variable solve_pde_for_trivial_solution=True
and pde_solver=FDM()
when creating the dataset. However, this only works the first time you download the data. If you are reading the data locally, the code will directly execute:
self._load_dataset()
to load the data from a local .pt
file. However, self._load_dataset()
does not accept solve_pde_for_trivial_solution=True
or pde_solver=FDM()
, which prevents the successful implementation of PDEPreprocessing()
. Therefore, I believe the following implementation should be used:
if solve_pde_for_trivial_solution:
self._load_dataset(pde_solver)
else:
self._load_dataset()
def _load_dataset(self,pde_solver=None):
self.dataset = []
if self.verbose:
print('importing dataset...')
pt_file_paths = tqdm(self.pt_file_paths)
for pt_file_path in pt_file_paths:
a, b = torch.load(pt_file_path)
a.pde_solver = pde_solver
self.dataset.append((a, b))
if self.verbose:
print('done!')
Metadata
Metadata
Assignees
Labels
No labels