Skip to content

Commit

Permalink
Allow None in Keras loss multitask loss (#179)
Browse files Browse the repository at this point in the history
When training multi output models Keras allows to use `loss=None` for some branches. Adapt typings to support this.
  • Loading branch information
lgeiger authored Aug 12, 2020
1 parent 61b1162 commit 230b455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zookeeper/tf/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ class Experiment:
epochs: int = Field()
batch_size: int = Field()
loss: Optional[
Union[Sequence[Union[keras.losses.Loss, str]], keras.losses.Loss, str]
Union[Sequence[Union[keras.losses.Loss, str, None]], keras.losses.Loss, str]
] = Field()
optimizer: Union[keras.optimizers.Optimizer, str] = Field()

0 comments on commit 230b455

Please sign in to comment.