Skip to content

Commit

Permalink
Idiotic blueprint for sample()
Browse files Browse the repository at this point in the history
  • Loading branch information
Radev committed May 15, 2024
1 parent 1c62304 commit 0875002
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bayesflow/experimental/amortizers/amortizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,15 @@ def compute_metrics(self, x: dict, y: dict, y_pred: dict, **kwargs):

return inference_metrics | summary_metrics

def sample(self, *args, **kwargs):
return self.inference_network.sample(*args, **kwargs)
def sample(self, data: dict, num_samples: int, sample_summaries=False, **kwargs):

# Configure everything -> inference conditions / summary conditions
configured_observables = None

# Decide whether summaries are present or not / whether sumamry network is present or not
# ...

return self.inference_network.sample(conditions=configured_observables, **kwargs)

def log_prob(self, *args, **kwargs):
return self.inference_network.log_prob(*args, **kwargs)
Expand Down

0 comments on commit 0875002

Please sign in to comment.