Skip to content

Commit d825315

Browse files
committed
fix reassignment of activation in loop
1 parent 6cd25c3 commit d825315

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bayesflow/experimental/resnet/resnet.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ def __init__(
3030
for width in widths:
3131
layer = DoubleConv(width, use_batchnorm=use_batchnorm, dropout=dropout, activation=activation)
3232
layer = Residual(layer)
33-
activation = keras.activations.get(activation)
34-
if not isinstance(activation, keras.Layer):
35-
activation = keras.layers.Activation(activation)
33+
act = keras.activations.get(activation)
34+
if not isinstance(act, keras.Layer):
35+
act = keras.layers.Activation(act)
3636
maxpool = keras.layers.MaxPool2D(pool_size=(2, 2), strides=(2, 2))
3737

3838
layers.append(layer)
39-
layers.append(activation)
39+
layers.append(act)
4040
layers.append(maxpool)
4141

4242
super().__init__(layers, **model_kwargs(kwargs))

0 commit comments

Comments
 (0)