8000 this is a problem of using PDEPreprocessing() · Issue #10 · dl4to/dl4to · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
this is a problem of using PDEPreprocessing() #10
Open
@muyangren123321

Description

@muyangren123321

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0