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

Warning when running the HMC.ipynb notebook #32

Closed
rlouf opened this issue Sep 28, 2021 · 0 comments
Closed

Warning when running the HMC.ipynb notebook #32

rlouf opened this issue Sep 28, 2021 · 0 comments

Comments

@rlouf
Copy link
Member

rlouf commented Sep 28, 2021

Although the code runs and the results seem unaffected, cell 12 returns the following warning:

WARNING (aesara.tensor.basic_opt): Failed to infer_shape from Op normal_rv{0, (0, 0), floatX, False}.
Input shapes: [None, (TensorConstant{1},), (), (), ()]
Exception encountered during infer_shape: <class 'ValueError'>
Exception message: Length of <TensorType(int64, vector)> cannot be determined

This was discovered in #29 but also happens on main with aeppl v0.0.12. This warning did not appear with previous versions in aeppl so I believe this is linked to a recent change in the library. Here is the corresponding subgraph:

> |   |InplaceDimShuffle{} [id DJ] ''   
 > |   | |Gemv{no_inplace} [id DK] ''   
 > |   |   |AllocEmpty{dtype='float64'} [id DL] ''   
 > |   |   | |TensorConstant{1} [id DM]
 > |   |   |TensorConstant{1.0} [id DN]
 > |   |   |InplaceDimShuffle{x,0} [id DO] ''   
 > |   |   | |Elemwise{Mul}[(0, 1)] [id DP] ''   
 > |   |   |   |<TensorType(float64, vector)> [id DQ] -> [id DA]
 > |   |   |   |normal_rv{0, (0, 0), floatX, False}.1 [id DR] ''   
 > |   |   |     |<RandomGeneratorType> [id DS] -> [id CU]
 > |   |   |     |<TensorType(int64, vector)> [id DT] -> [id CY]
 > |   |   |     |TensorConstant{11} [id DU]
 > |   |   |     |TensorConstant{0} [id DV]
 > |   |   |     |TensorConstant{1} [id DM]
 > |   |   |Elemwise{mul,no_inplace} [id DW] ''   
 > |   |   | |inverse_mass_matrix_copy [id DX] -> [id CV]
 > |   |   | |<TensorType(float64, vector)> [id DQ] -> [id DA]
 > |   |   | |normal_rv{0, (0, 0), floatX, False}.1 [id DR] ''   
 > |   |   |TensorConstant{0.0} [id DY]

Interestingly the previous cells that apply the kernel for one step outside of the scan loop do not return this warning. I am working on a minimal example and will move the issue to aeppl if necessary.

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

No branches or pull requests

1 participant