Skip to content

Commit 3d391d8

Browse files
committed
fix: remove extra deserialize call for SummaryNetwork
The extra call leads to the DTypePolicy to be deserialized. This is then passed as a class, and cannot be handled by autoconf, leading to the error discussed in #549
1 parent 326f05a commit 3d391d8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

bayesflow/networks/summary_network.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from bayesflow.types import Tensor
55
from bayesflow.utils import layer_kwargs, find_distribution
66
from bayesflow.utils.decorators import sanitize_input_shape
7-
from bayesflow.utils.serialization import deserialize
87

98

109
class SummaryNetwork(keras.Layer):
@@ -50,7 +49,3 @@ def compute_metrics(self, x: Tensor, stage: str = "training", **kwargs) -> dict[
5049
metrics[metric.name] = metric(outputs, samples)
5150

5251
return metrics
53-
54-
@classmethod
55-
def from_config(cls, config, custom_objects=None):
56-
return cls(**deserialize(config, custom_objects=custom_objects))

0 commit comments

Comments
 (0)