{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/32658","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/32658/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/32658/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/32658/events","html_url":"https://github.com/tensorflow/tensorflow/issues/32658","id":495843094,"node_id":"MDU6SXNzdWU0OTU4NDMwOTQ=","number":32658,"title":"Why doesn't tf.matmul work with transposed tensor?","user":{"login":"qo4on","id":35609308,"node_id":"MDQ6VXNlcjM1NjA5MzA4","avatar_url":"https://avatars2.githubusercontent.com/u/35609308?v=4","gravatar_id":"","url":"https://api.github.com/users/qo4on","html_url":"https://github.com/qo4on","followers_url":"https://api.github.com/users/qo4on/followers","following_url":"https://api.github.com/users/qo4on/following{/other_user}","gists_url":"https://api.github.com/users/qo4on/gists{/gist_id}","starred_url":"https://api.github.com/users/qo4on/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qo4on/subscriptions","organizations_url":"https://api.github.com/users/qo4on/orgs","repos_url":"https://api.github.com/users/qo4on/repos","events_url":"https://api.github.com/users/qo4on/events{/privacy}","received_events_url":"https://api.github.com/users/qo4on/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-09-19T14:39:06Z","updated_at":"2019-09-19T15:26:59Z","closed_at":null,"author_association":"NONE","body":"Why doesn't `tf.matmul` work with transposed tensor?\r\n\r\n`transpose_b=True` is ok, but not `tf.transpose(inp)`.\r\n\r\nThis screenshot was made in Colab with `tensorflow-gpu==2.0.0-rc1`:\r\n\r\n![image](https://user-images.githubusercontent.com/35609308/65253964-f2bfdd80-db14-11e9-859f-ca6a38498d20.png)"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/533184018","html_url":"https://github.com/tensorflow/tensorflow/issues/32658#issuecomment-533184018","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/32658","id":533184018,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMzE4NDAxOA==","user":{"login":"WindQAQ","id":11615393,"node_id":"MDQ6VXNlcjExNjE1Mzkz","avatar_url":"https://avatars2.githubusercontent.com/u/11615393?v=4","gravatar_id":"","url":"https://api.github.com/users/WindQAQ","html_url":"https://github.com/WindQAQ","followers_url":"https://api.github.com/users/WindQAQ/followers","following_url":"https://api.github.com/users/WindQAQ/following{/other_user}","gists_url":"https://api.github.com/users/WindQAQ/gists{/gist_id}","starred_url":"https://api.github.com/users/WindQAQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WindQAQ/subscriptions","organizations_url":"https://api.github.com/users/WindQAQ/orgs","repos_url":"https://api.github.com/users/WindQAQ/repos","events_url":"https://api.github.com/users/WindQAQ/events{/privacy}","received_events_url":"https://api.github.com/users/WindQAQ/received_events","type":"User","site_admin":false},"created_at":"2019-09-19T15:26:59Z","updated_at":"2019-09-19T15:26:59Z","author_association":"MEMBER","body":"Hi @qo4on, it's because you are trying to transpose 3D tensor with `tf.transpose`. The `perm` argument defaults to `None` and will transpose the first and last axis only. You have to let `perm=[0, 2, 1]` so that the shape is compatible with batch matrix multiplication.\r\n\r\nThe workable example is here:\r\nhttps://colab.research.google.com/drive/1JMEpncNz23mQ4EHOj1QUak27sH1Iw-lg"}}
{"actor":{"display_login":"WindQAQ"}}