Skip to content

Commit

Permalink
update grid var to post subsampling
Browse files Browse the repository at this point in the history
  • Loading branch information
kmario23 authored Oct 3, 2024
1 parent b11eab3 commit e58e698
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdebench/models/fno/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def __init__(self, filename,
gridx, gridy = np.array(f['0023']['grid']['x'], dtype=np.float32), np.array(f['0023']['grid']['y'], dtype=np.float32)
mgridX, mgridY = np.meshgrid(gridx, gridy, indexing='ij')
_grid = torch.stack((torch.from_numpy(mgridX), torch.from_numpy(mgridY)), axis=-1)
grid = _grid[::reduced_resolution, ::reduced_resolution, ...]
_grid = _grid[::reduced_resolution, ::reduced_resolution, ...]
_tsteps_t = torch.from_numpy(np.array(f['0023']['grid']['t'], dtype=np.float32))
tsteps_t = _tsteps_t[::reduced_resolution_t]
self.data = _data
Expand Down

0 comments on commit e58e698

Please sign in to comment.