{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/skflow/issues/101","repository_url":"https://api.github.com/repos/tensorflow/skflow","labels_url":"https://api.github.com/repos/tensorflow/skflow/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/skflow/issues/101/comments","events_url":"https://api.github.com/repos/tensorflow/skflow/issues/101/events","html_url":"https://github.com/tensorflow/skflow/issues/101","id":133208996,"number":101,"title":"Adding variable to summaries changes training results","user":{"login":"olegarch","id":1417018,"avatar_url":"https://avatars.githubusercontent.com/u/1417018?v=3","gravatar_id":"","url":"https://api.github.com/users/olegarch","html_url":"https://github.com/olegarch","followers_url":"https://api.github.com/users/olegarch/followers","following_url":"https://api.github.com/users/olegarch/following{/other_user}","gists_url":"https://api.github.com/users/olegarch/gists{/gist_id}","starred_url":"https://api.github.com/users/olegarch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olegarch/subscriptions","organizations_url":"https://api.github.com/users/olegarch/orgs","repos_url":"https://api.github.com/users/olegarch/repos","events_url":"https://api.github.com/users/olegarch/events{/privacy}","received_events_url":"https://api.github.com/users/olegarch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-12T10:53:26Z","updated_at":"2016-02-14T05:22:28Z","closed_at":null,"body":"I've added prob value from dropout as scalar summary to confirm that it is trainable and its value is changing from step to step.\r\n                prob = tf.get_variable(\"prob\", [],\r\n                                       initializer=tf.constant_initializer(prob),\r\n                                       trainable=True)\r\n                tf.scalar_summary(prob.op.name, prob)\r\nJust adding it to summaries changed the results of the training.\r\nIs it expected?"},"comment":{"url":"https://api.github.com/repos/tensorflow/skflow/issues/comments/183823383","html_url":"https://github.com/tensorflow/skflow/issues/101#issuecomment-183823383","issue_url":"https://api.github.com/repos/tensorflow/skflow/issues/101","id":183823383,"user":{"login":"ilblackdragon","id":175486,"avatar_url":"https://avatars.githubusercontent.com/u/175486?v=3","gravatar_id":"","url":"https://api.github.com/users/ilblackdragon","html_url":"https://github.com/ilblackdragon","followers_url":"https://api.github.com/users/ilblackdragon/followers","following_url":"https://api.github.com/users/ilblackdragon/following{/other_user}","gists_url":"https://api.github.com/users/ilblackdragon/gists{/gist_id}","starred_url":"https://api.github.com/users/ilblackdragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilblackdragon/subscriptions","organizations_url":"https://api.github.com/users/ilblackdragon/orgs","repos_url":"https://api.github.com/users/ilblackdragon/repos","events_url":"https://api.github.com/users/ilblackdragon/events{/privacy}","received_events_url":"https://api.github.com/users/ilblackdragon/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T05:22:28Z","updated_at":"2016-02-14T05:22:28Z","body":"Apparently adding summary changes something in random number generator order and produces different initalization values for variables. This explains why when you add a scalar - it results in slihtly different results, you may want to try to train for longer in your case to stabilize. (the bug with dropout probability fixed, thanks for reporting!).\r\n\r\nHere is minimal code reproduce (I'll post it to TF main thread):\r\n\r\n````\r\nimport tensorflow as tf\r\n\r\nwith tf.Session('') as sess:\r\n    tf.set_random_seed(42)\r\n    x = tf.placeholder(tf.float32, [1, 1])\r\n    #tf.scalar_summary('d', 1.)\r\n    y = tf.get_variable('y', [1, 5])\r\n    d = tf.matmul(x, y)\r\n    tf.merge_all_summaries()\r\n    sess.run(tf.initialize_all_variables())\r\n    print sess.run(d, feed_dict={x: [[1.]]})\r\n```\r\n\r\nCommenting / uncommenting scalar_summary changes results:\r\n```[[ 1.25666416  0.54304159  1.69930065  1.39638388  0.80949366]]``` to ```[[-1.7023375   1.63059771 -1.05339909 -1.40406322 -1.13437796]]```\r\n "}}