-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
WIP: Implement opvi #1694
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
Merged
Merged
WIP: Implement opvi #1694
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
cbc5568
migrate useful functions from previous PR
ferrine d69a96e
opvi draft
ferrine 973ca6e
made some test work
ferrine aca56f6
refactored approximation to support aevb (without test)
ferrine 1df1104
refactor opvi
ferrine a07afed
change log_q_local computation
ferrine 33f8c80
add full rank approximation
ferrine df9adfc
add more_params argument to ObjectiveFunction.updates (aevb case)
ferrine 3780a4b
refactor density computation in full rank approximation
ferrine bf6c234
typo: cast dict values to list
ferrine f3c6be6
typo: cast dict values to list
ferrine 906dc5a
typo: undefined T in dist_math
ferrine 49c96e1
refactor gradient scaling as suggested in approximateinference.org/ac…
ferrine 85151ee
implement Langevin-Stein (LS) operator
ferrine a29709c
fix docstring
ferrine 3363c98
add blank line in docs
ferrine 81f1217
refactor ObjectiveFunction
ferrine d92afd2
add not working LS Op test
ferrine df54d77
experiments with not working LS Op
ferrine a0cd3df
change activations
ferrine 2096601
refactor networks
ferrine adfb0e4
add step_function
ferrine 8febbc1
remove Langevin Stein, done refactoring
ferrine 1ffab9c
remove Langevin Stein, done refactoring
ferrine bff2d58
change optimizers
ferrine feab53c
refactor init params
ferrine 76b1bf1
implement tests
ferrine 80dee6d
implement Inference
ferrine 1eda78b
code style
ferrine fcdeb1b
test fix
ferrine 0e02929
add minibatch test (fails now)
ferrine dc2578d
add more tests for minibatch training
ferrine 4638532
add logdet to FullRank approximation
ferrine 4b55969
add conversion of arrays to floatX
ferrine 4237f07
tiny changes
ferrine 87b2cc5
change number of iterations
ferrine 96aa930
fix test and pylint check
ferrine 76c5fd7
memoize functions in Objective function
ferrine a59eebc
Optimize code a lot
ferrine 9e8bf41
a bit more efficient pickling
ferrine afa8af2
add docs
ferrine 4fcef3c
Add MeanField -> FullRank parameter transfer
ferrine 6bfc243
refactor MeanField and FullRank a bit
ferrine 3049d8f
fix FullRank bug with shapes in random
ferrine a7a31de
refactor Model.flatten (CC @taku-y)
ferrine 32487c4
add `approximate` to inference
ferrine c415647
rename approximate->fit
ferrine 3ccc7b8
change abbreviations
ferrine 3c1b805
Fix bug with scaling input variable in aevb
ferrine 6a7d84f
fix theano bottleneck in graph
ferrine c695990
more efficient scaling for local vars
ferrine 92f0ca7
fix typo in local Q
ferrine b6ac76e
add aevb test
ferrine 7a036f2
refactor memoize to work with my objects
ferrine 57eb4c1
add tests for numpy view usage
ferrine 1e8d2ec
pickle-hash fix
ferrine d90af39
pickle-hash fix again
ferrine 2b7f84e
add node sampling + make up some code
ferrine c4da035
add notebook with example
ferrine 6747dc3
sample_proba explained
ferrine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
865 changes: 865 additions & 0 deletions
865
docs/source/notebooks/bayesian_neural_network_opvi-advi.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c
is scaled with the number of elements inx
:c
->c * x.ravel().shape[0]
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are elemwise operations, so that's ok here