Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backbone KeyError #10

Merged
merged 1 commit into from
Dec 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tf_cfc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ def build(self, input_shape):
else:
input_dim = input_shape[-1]

if self.hparams["backbone_activation"] == "silu":
if self.hparams.get("backbone_activation") == "silu":
backbone_activation = tf.nn.silu
elif self.hparams["backbone_activation"] == "relu":
elif self.hparams.get("backbone_activation") == "relu":
backbone_activation = tf.nn.relu
elif self.hparams["backbone_activation"] == "tanh":
elif self.hparams.get("backbone_activation") == "tanh":
backbone_activation = tf.nn.tanh
elif self.hparams["backbone_activation"] == "gelu":
elif self.hparams.get("backbone_activation") == "gelu":
backbone_activation = tf.nn.gelu
elif self.hparams["backbone_activation"] == "lecun":
elif self.hparams.get("backbone_activation") == "lecun":
backbone_activation = lecun_tanh
elif self.hparams["backbone_activation"] == "softplus":
elif self.hparams.get("backbone_activation") == "softplus":
backbone_activation = tf.nn.softplus
else:
raise ValueError("Unknown backbone activation")
Expand Down