Skip to content

Commit 5c27246

Browse files
committed
fix batch_shape for sample
1 parent 8fbf737 commit 5c27246

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bayesflow/approximators/continuous_approximator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,10 @@ def _sample(
535535
inference_conditions = keras.ops.broadcast_to(
536536
inference_conditions, (batch_size, num_samples, *keras.ops.shape(inference_conditions)[2:])
537537
)
538-
batch_shape = keras.ops.shape(inference_conditions)[:-1]
538+
batch_shape = (
539+
batch_size,
540+
num_samples,
541+
)
539542
else:
540543
batch_shape = (num_samples,)
541544

0 commit comments

Comments
 (0)