Skip to content

Commit 260bc0f

Browse files
Fix return type in examples/tempoGAN/functions.py for tempoGAN (#963)
1 parent 87239d0 commit 260bc0f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/zh/examples/spinn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ examples/spinn/helmholtz3d.py:106:156
140140

141141
第四个参数是约束条件的名字,需要给每一个约束条件命名,方便后续对其索引。此处命名为 "PDE" 即可。
142142

143-
#### 3.3.3 边值约束
143+
#### 3.3.2 边值约束
144144

145145
第三个约束条件是边值约束,代码如下:
146146

examples/tempoGAN/functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def loss_func(self, output_dict, *args):
407407
out_disc_from_gen, label_zeros, reduction="mean"
408408
)
409409
losses = loss_disc_from_target * self.weight_disc + loss_disc_from_gen
410-
return {"CE_loss", losses}
410+
return {"CE_loss": losses}
411411

412412
def loss_func_tempo(self, output_dict, *args):
413413
out_disc_tempo_from_target = output_dict["out_disc_tempo_from_target"]
@@ -425,7 +425,7 @@ def loss_func_tempo(self, output_dict, *args):
425425
losses = (
426426
loss_disc_tempo_from_target * self.weight_disc + loss_disc_tempo_from_gen
427427
)
428-
return {"CE_tempo_loss", losses}
428+
return {"CE_tempo_loss": losses}
429429

430430

431431
class DataFuncs:

0 commit comments

Comments
 (0)