Skip to content

Commit a73fc91

Browse files
committed
quickfix: ensure that Dense layers in Sequential are built
The problem seems also to be related to using the Ellipsis in the input shape. Fixes #491
1 parent cd2c212 commit a73fc91

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bayesflow/networks/mlp/mlp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ def build(self, input_shape=None):
9292

9393
for layer in self._layers:
9494
layer.build(input_shape)
95+
if not layer.layers[0].built:
96+
layer.layers[0].build(input_shape)
9597
input_shape = layer.compute_output_shape(input_shape)
9698

9799
@classmethod

0 commit comments

Comments
 (0)