Skip to content

Commit f16c823

Browse files
committed
Refactor notes, CC @junpenglao
1 parent ff5d276 commit f16c823

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

pymc3/variational/opvi.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -968,16 +968,12 @@ def _new_initial(self, size, deterministic, more_replacements=None):
968968
969969
Notes
970970
-----
971-
Corner case explained
971+
Suppose you have a AEVB setup that:
972972
973-
- suppose you have AEVB setup
974-
- `X` is purely symbolic
975-
- `X.shape[0]` is needed for `initial` second dim
976-
- for inference you replace `X` with data tensor
977-
- `X.shape[0]` in `initial` remains symbolic and can't be replaced
978-
- you get `MissingInputError`
979-
980-
Solution is to do manual replacements for second dim in `initial` here
973+
- input `X` is purely symbolic, and `X.shape[0]` is needed to `initial` second dim
974+
- to perform inference, `X` is replaced with data tensor, however, since `X.shape[0]` in `initial`
975+
remains symbolic and can't be replaced, you get `MissingInputError`
976+
- as a solution, here we perform a manual replacement for the second dim in `initial`.
981977
982978
Returns
983979
-------

0 commit comments

Comments
 (0)