{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/21250","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/21250/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/21250/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/21250/events","html_url":"https://github.com/tensorflow/tensorflow/issues/21250","id":345884966,"node_id":"MDU6SXNzdWUzNDU4ODQ5NjY=","number":21250,"title":"tf.Print support of tf.complex types","user":{"login":"annemenini","id":13631130,"node_id":"MDQ6VXNlcjEzNjMxMTMw","avatar_url":"https://avatars0.githubusercontent.com/u/13631130?v=4","gravatar_id":"","url":"https://api.github.com/users/annemenini","html_url":"https://github.com/annemenini","followers_url":"https://api.github.com/users/annemenini/followers","following_url":"https://api.github.com/users/annemenini/following{/other_user}","gists_url":"https://api.github.com/users/annemenini/gists{/gist_id}","starred_url":"https://api.github.com/users/annemenini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annemenini/subscriptions","organizations_url":"https://api.github.com/users/annemenini/orgs","repos_url":"https://api.github.com/users/annemenini/repos","events_url":"https://api.github.com/users/annemenini/events{/privacy}","received_events_url":"https://api.github.com/users/annemenini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"annemenini","id":13631130,"node_id":"MDQ6VXNlcjEzNjMxMTMw","avatar_url":"https://avatars0.githubusercontent.com/u/13631130?v=4","gravatar_id":"","url":"https://api.github.com/users/annemenini","html_url":"https://github.com/annemenini","followers_url":"https://api.github.com/users/annemenini/followers","following_url":"https://api.github.com/users/annemenini/following{/other_user}","gists_url":"https://api.github.com/users/annemenini/gists{/gist_id}","starred_url":"https://api.github.com/users/annemenini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annemenini/subscriptions","organizations_url":"https://api.github.com/users/annemenini/orgs","repos_url":"https://api.github.com/users/annemenini/repos","events_url":"https://api.github.com/users/annemenini/events{/privacy}","received_events_url":"https://api.github.com/users/annemenini/received_events","type":"User","site_admin":false},"assignees":[{"login":"annemenini","id":13631130,"node_id":"MDQ6VXNlcjEzNjMxMTMw","avatar_url":"https://avatars0.githubusercontent.com/u/13631130?v=4","gravatar_id":"","url":"https://api.github.com/users/annemenini","html_url":"https://github.com/annemenini","followers_url":"https://api.github.com/users/annemenini/followers","following_url":"https://api.github.com/users/annemenini/following{/other_user}","gists_url":"https://api.github.com/users/annemenini/gists{/gist_id}","starred_url":"https://api.github.com/users/annemenini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annemenini/subscriptions","organizations_url":"https://api.github.com/users/annemenini/orgs","repos_url":"https://api.github.com/users/annemenini/repos","events_url":"https://api.github.com/users/annemenini/events{/privacy}","received_events_url":"https://api.github.com/users/annemenini/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-07-30T18:42:15Z","updated_at":"2018-10-15T12:57:48Z","closed_at":null,"author_association":"NONE","body":"### System information\r\n- **Have I written custom code (as opposed to using a stock example script provided in TensorFlow)**: Custom code\r\n- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: macOS 10.12.6\r\n- **Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device**: n/a\r\n- **TensorFlow installed from (source or binary)**: binary\r\n- **TensorFlow version (use command below)**: v1.9.0-0-g25c197e023 1.9.0\r\n- **Python version**: 3.6.3\r\n- **Bazel version (if compiling from source)**: n/a\r\n- **GCC/Compiler version (if compiling from source)**: n/a\r\n- **CUDA/cuDNN version**: n/a (cpu execution)\r\n- **GPU model and memory**: n/a (cpu execution)\r\n- **Exact command to reproduce**: cf test case below\r\n\r\n### Problem description\r\nWhen using the `tf.Print` operation on complex data, the printed output only shows question marks (`?`) in place of the complex values. The documentation does not indicate a limitation on the type of tensors of the data argument. It would be good to add that limitation in the documentation or even better, support tf.complex types. In the meanwhile, one can work around and use tf.real and tf.imag. The test case below shows the problem and the work around.\r\nNote that the problem was already present with Tensorflow 1.7.\r\n\r\n### Source code / logs\r\nSources:\r\n```\r\nimport numpy as np\r\nimport tensorflow as tf\r\n\r\n\r\na = np.array([[1, 2], [3, 4]])\r\n\r\ninput1 = tf.placeholder(tf.complex64, shape=[2,2], name=\"input1\")\r\ninput2 = tf.placeholder(tf.float32, shape=[2, 2], name=\"input2\")\r\n\r\ninput1 = tf.Print(input1, [input1], \"input1: \")\r\ninput1 = tf.Print(input1, [tf.real(input1)], \"input1.real: \")\r\ninput2 = tf.Print(input2, [input2], \"input2: \")\r\n\r\noutput1 = tf.identity(input1, name=\"output1\")\r\noutput2 = tf.identity(input2, name=\"output2\")\r\n\r\nsess = tf.InteractiveSession()\r\n\r\nout1, out2 = sess.run([\"output1:0\", \"output2:0\"], {\"input1:0\": a, \"input2:0\": a})\r\n```\r\nConsole output:\r\n```\r\ninput2: [[1 2][3]...]input1: [? ? ?...]\r\n\r\ninput1.real: [[1 2][3]...]\r\n```\r\nBy the way, the formatting of the printed messages (line returns) looks weird. This appeared when going from TF1.7 to 1.9, but this is not the point of that issue."},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/429842920","html_url":"https://github.com/tensorflow/tensorflow/issues/21250#issuecomment-429842920","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/21250","id":429842920,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTg0MjkyMA==","user":{"login":"tensorflowbutler","id":28546240,"node_id":"MDQ6VXNlcjI4NTQ2MjQw","avatar_url":"https://avatars2.githubusercontent.com/u/28546240?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorflowbutler","html_url":"https://github.com/tensorflowbutler","followers_url":"https://api.github.com/users/tensorflowbutler/followers","following_url":"https://api.github.com/users/tensorflowbutler/following{/other_user}","gists_url":"https://api.github.com/users/tensorflowbutler/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflowbutler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflowbutler/subscriptions","organizations_url":"https://api.github.com/users/tensorflowbutler/orgs","repos_url":"https://api.github.com/users/tensorflowbutler/repos","events_url":"https://api.github.com/users/tensorflowbutler/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflowbutler/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T12:57:48Z","updated_at":"2018-10-15T12:57:48Z","author_association":"MEMBER","body":"Nagging Assignee @annemenini: It has been 73 days with no activity and this issue has an assignee. Please update the label and/or status accordingly."}}
{"actor":{"display_login":"tensorflowbutler"}}