Skip to content

Commit 25bda95

Browse files
Merge pull request #64 from AnnihilatorChess/master
FNO and TFNO did not the FNO/TFNO blocks
2 parents bf4e08a + e430160 commit 25bda95

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

the_well/benchmark/models/fno/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def forward(self, x: torch.Tensor, output_shape=None, **kwargs):
4747
x = self.domain_padding.pad(x)
4848

4949
for layer_idx in range(self.n_layers):
50-
self.optional_checkpointing(
50+
x = self.optional_checkpointing(
5151
self.fno_blocks, x, layer_idx, output_shape=output_shape[layer_idx]
5252
)
5353

the_well/benchmark/models/tfno/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def forward(self, x: torch.Tensor, output_shape=None, **kwargs):
4545
x = self.domain_padding.pad(x)
4646

4747
for layer_idx in range(self.n_layers):
48-
self.optional_checkpointing(
48+
x = self.optional_checkpointing(
4949
self.fno_blocks, x, layer_idx, output_shape=output_shape[layer_idx]
5050
)
5151

0 commit comments

Comments
 (0)