{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3054","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3054/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3054/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3054/events","html_url":"https://github.com/tensorflow/tensorflow/issues/3054","id":162337657,"number":3054,"title":"Multivariate normal distribution crashes on broadcast","user":{"login":"jlowin","id":153965,"avatar_url":"https://avatars.githubusercontent.com/u/153965?v=3","gravatar_id":"","url":"https://api.github.com/users/jlowin","html_url":"https://github.com/jlowin","followers_url":"https://api.github.com/users/jlowin/followers","following_url":"https://api.github.com/users/jlowin/following{/other_user}","gists_url":"https://api.github.com/users/jlowin/gists{/gist_id}","starred_url":"https://api.github.com/users/jlowin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlowin/subscriptions","organizations_url":"https://api.github.com/users/jlowin/orgs","repos_url":"https://api.github.com/users/jlowin/repos","events_url":"https://api.github.com/users/jlowin/events{/privacy}","received_events_url":"https://api.github.com/users/jlowin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/triaged","name":"triaged","color":"c2e0c6"}],"state":"closed","locked":false,"assignee":{"login":"ebrevdo","id":1794715,"avatar_url":"https://avatars.githubusercontent.com/u/1794715?v=3","gravatar_id":"","url":"https://api.github.com/users/ebrevdo","html_url":"https://github.com/ebrevdo","followers_url":"https://api.github.com/users/ebrevdo/followers","following_url":"https://api.github.com/users/ebrevdo/following{/other_user}","gists_url":"https://api.github.com/users/ebrevdo/gists{/gist_id}","starred_url":"https://api.github.com/users/ebrevdo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebrevdo/subscriptions","organizations_url":"https://api.github.com/users/ebrevdo/orgs","repos_url":"https://api.github.com/users/ebrevdo/repos","events_url":"https://api.github.com/users/ebrevdo/events{/privacy}","received_events_url":"https://api.github.com/users/ebrevdo/received_events","type":"User","site_admin":false},"assignees":[{"login":"ebrevdo","id":1794715,"avatar_url":"https://avatars.githubusercontent.com/u/1794715?v=3","gravatar_id":"","url":"https://api.github.com/users/ebrevdo","html_url":"https://github.com/ebrevdo","followers_url":"https://api.github.com/users/ebrevdo/followers","following_url":"https://api.github.com/users/ebrevdo/following{/other_user}","gists_url":"https://api.github.com/users/ebrevdo/gists{/gist_id}","starred_url":"https://api.github.com/users/ebrevdo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebrevdo/subscriptions","organizations_url":"https://api.github.com/users/ebrevdo/orgs","repos_url":"https://api.github.com/users/ebrevdo/repos","events_url":"https://api.github.com/users/ebrevdo/events{/privacy}","received_events_url":"https://api.github.com/users/ebrevdo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-06-26T17:25:52Z","updated_at":"2016-07-01T12:05:45Z","closed_at":"2016-07-01T12:05:45Z","body":"\r\n### Environment info\r\nOperating System: Mac OS X 10.11.5\r\n\r\nIf installed from binary pip package, provide:\r\n\r\n1. Which pip package you installed. \r\n  https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0-py3-none-any.whl\r\n\r\n2. The output from `python -c \"import tensorflow; print(tensorflow.__version__)\"`.\r\n  0.9.0\r\n\r\n### Issue\r\n\r\nThe Multivariate Normal distribution in `contrib.distributions` [claims to support broadcasting](https://github.com/tensorflow/tensorflow/blob/d42facc3cc9611f0c9722c81551a7404a0bd3f6b/tensorflow/contrib/distributions/python/ops/mvn.py#L378) but it does not appear to work. This script will illustrate the issue:\r\n\r\n```python\r\nimport numpy as np\r\nimport tensorflow as tf\r\n\r\n# dimensions\r\na = 2\r\nb = 3\r\nc = 4\r\n\r\nmu = tf.reshape(tf.constant(\r\n    np.arange(a * b * c * 1.0)),\r\n    [a, b, c])\r\n\r\nsigma = tf.batch_matrix_diag(tf.reshape(tf.constant(\r\n    np.arange(a * b * c * 1.0) + 1),\r\n    [a, b, c]))\r\n\r\nmvn = tf.contrib.distributions.MultivariateNormal(mu, sigma)\r\n\r\nwith tf.Session() as sess:\r\n    # works because shape(input) == shape(mu)\r\n    sess.run(mvn.pdf(np.ones((a, b, c))))\r\n    \r\n    # fails even though input and mu are broadcastable\r\n    sess.run(mvn.pdf(np.ones((1, a, b, c))))\r\n```"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/229930031","html_url":"https://github.com/tensorflow/tensorflow/issues/3054#issuecomment-229930031","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3054","id":229930031,"user":{"login":"jlowin","id":153965,"avatar_url":"https://avatars.githubusercontent.com/u/153965?v=3","gravatar_id":"","url":"https://api.github.com/users/jlowin","html_url":"https://github.com/jlowin","followers_url":"https://api.github.com/users/jlowin/followers","following_url":"https://api.github.com/users/jlowin/following{/other_user}","gists_url":"https://api.github.com/users/jlowin/gists{/gist_id}","starred_url":"https://api.github.com/users/jlowin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlowin/subscriptions","organizations_url":"https://api.github.com/users/jlowin/orgs","repos_url":"https://api.github.com/users/jlowin/repos","events_url":"https://api.github.com/users/jlowin/events{/privacy}","received_events_url":"https://api.github.com/users/jlowin/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T12:05:45Z","updated_at":"2016-07-01T12:05:45Z","body":"@langmore very cool! Looking forward to the new tools. I'll close this issue."}}
{"actor":{"display_login":"jlowin"}}