Skip to content

Commit 2566eb4

Browse files
committed
fix TypeError
1 parent 7b55a37 commit 2566eb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bayesflow/experimental/diffusion_model/diffusion_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ def __init__(
8888
self.noise_schedule.validate()
8989

9090
if prediction_type not in ["noise", "velocity", "F"]: # F is EDM
91-
raise ValueError(f"Unknown prediction type: {prediction_type}")
91+
raise TypeError(f"Unknown prediction type: {prediction_type}")
9292
self._prediction_type = prediction_type
9393
self._loss_type = kwargs.get("loss_type", "noise")
9494
if self._loss_type not in ["noise", "velocity", "F"]:
95-
raise ValueError(f"Unknown loss type: {self._loss_type}")
95+
raise TypeError(f"Unknown loss type: {self._loss_type}")
9696
if self._loss_type != "noise":
9797
logging.warning(
9898
"the standard schedules have weighting functions defined for the noise prediction loss. "

0 commit comments

Comments
 (0)