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

Vector size #33

Open
haohaiziround opened this issue Jan 14, 2018 · 0 comments
Open

Vector size #33

haohaiziround opened this issue Jan 14, 2018 · 0 comments
Assignees

Comments

@haohaiziround
Copy link
Collaborator

Should we use n by 1 or length n for the size of a vector, eg. [0, 0]?

There is some inconsistent issue with these in the mvn.

For example,

dist1 = MultivariateNormal(mu1=[0, 0], covariance_matrix=[[1, 0], [0, 1]])
dist2 = MultivariateNormal(mu2=[[0], [0]], covariance_matrix=[[1, 0], [0, 1]])

when we do the VariableCast for mu1 and mu2, they will be squeezed and turned into [0,0] and then a Variable. In other words, both mu will have size 2. However, if we draw sample from dist1 and dist2, which should be a vector and have the same size of mu, the size of the sample will be 1 by 2. It will be much clear in debug.

We need to solve this: either squeeze the sample or always ensure 1 by n or n by 1 for the size of vector.

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

2 participants