Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial updates #644

Merged
merged 3 commits into from
Feb 11, 2022
Merged

Tutorial updates #644

merged 3 commits into from
Feb 11, 2022

Conversation

michaeldeistler
Copy link
Contributor

@michaeldeistler michaeldeistler commented Feb 10, 2022

  • removes the default embedding net
  • introduces the FCEmbedding as an optional pre-configured embedding net
  • updates tutorials (mostly very minor updates)

@michaeldeistler
Copy link
Contributor Author

Running slow tests on this now

Copy link
Contributor

@janfb janfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks! just two minor comments.

sbi/neural_nets/embedding_nets.py Show resolved Hide resolved
"source": [
"import torch\n",
"\n",
"from sbi.inference import SNPE, prepare_for_sbi, simulate_for_sbi\n",
"from sbi.utils.get_nn_models import posterior_nn\n",
"from sbi import utils as utils\n",
"from sbi import analysis as analysis\n",
"torch.manual_seed(0)"
"_ = torch.manual_seed(0)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just torch.manual_seed(0)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torch.manual_seed(0) returns <torch._C.Generator object at 0x7f10e43d1a90> which I found a bit ugly in the notebook ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, makes sense then. Alternatively, one could add a ; at the end of the line, I think.

@michaeldeistler michaeldeistler merged commit 7f72eec into main Feb 11, 2022
@michaeldeistler michaeldeistler deleted the tutorial-updates branch February 11, 2022 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants