Repository navigation
968 adapt mnle to new densityestimator abstraction - #1089
Merged
michaeldeistler merged 15 commits intoMar 22, 2024
Merged
Conversation
* copy previous getting started * merged linear gaussian 0 and 1 * merged added docs and log prob and new pair plot example * work in jans comment, restructure next steps * add tutorial instruction landing page * added separation users / devs and links to all notebooks * replace one line example by multi line code example * fix comma * fix space, fix simulation-based science wording --------- Co-authored-by: augustes <[email protected]>
…github.com:sbi-dev/sbi into 968-adapt-mnle-to-new-densityestimator-abstraction
michaeldeistler
approved these changes
Mar 22, 2024
michaeldeistler
left a comment
Contributor
There was a problem hiding this comment.
Approve because tests are passing. Important dependency for #1066
| ) | ||
|
|
||
|
|
||
| class CategoricalMassEstimator(DensityEstimator): |
| """ | ||
|
|
||
| def __init__(self, net: CategoricalNet) -> None: | ||
| super().__init__(net=net, condition_shape=torch.Size([])) |
Contributor
There was a problem hiding this comment.
why such a weird condition_shape?
Collaborator
Author
There was a problem hiding this comment.
None was failing the type checking.
but this will be removed anyway later on
| discrete_x = self.discrete_net.sample( | ||
| sample_shape=sample_shape, | ||
| context=context, | ||
| ).reshape(sample_shape[0], -1) |
Contributor
There was a problem hiding this comment.
reshape to (*sample_shape, -1)
Contributor
There was a problem hiding this comment.
or is this supposed to be numel(sample_shape)?
| (context.repeat(sample_shape[0], 1), discrete_x), dim=1 | ||
| ), | ||
| sample_shape=sample_shape, | ||
| ).reshape(sample_shape[0], -1) |
michaeldeistler
deleted the
968-adapt-mnle-to-new-densityestimator-abstraction
branch
March 22, 2024 12:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix? Explain your changes
restructured MNLE/categorical distributions and adapted to new framework
Does this close any currently open issues?
Fixes # (issue)
Any relevant code examples, logs, error output, etc?
...
Any other comments?
...
Checklist
Put an
xin the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.
guidelines
with
pytest.mark.slow.guidelines
main(or there are no conflicts withmain)