Skip to content

Commit

Permalink
add norm_func support for ConvBNReLU
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardyehuang committed Apr 16, 2023
1 parent e273dfc commit 3b1f9d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layers/model_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def __init__(
use_bias=False,
groups=1,
conv_func=tf.keras.layers.Conv2D,
norm_func=normalization,
name=None,
):

Expand All @@ -54,7 +55,7 @@ def __init__(
name="{}_conv".format(name),
)

self.bn = None if not use_bn else normalization(trainable=trainable, name="{}_bn".format(name))
self.bn = None if not use_bn else norm_func(trainable=trainable, name="{}_bn".format(name))

self.activation = activation

Expand Down

0 comments on commit 3b1f9d2

Please sign in to comment.