{"action":"opened","issue":{"url":"https://api.github.com/repos/BinRoot/TensorFlow-Book/issues/31","repository_url":"https://api.github.com/repos/BinRoot/TensorFlow-Book","labels_url":"https://api.github.com/repos/BinRoot/TensorFlow-Book/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/BinRoot/TensorFlow-Book/issues/31/comments","events_url":"https://api.github.com/repos/BinRoot/TensorFlow-Book/issues/31/events","html_url":"https://github.com/BinRoot/TensorFlow-Book/issues/31","id":304111462,"number":31,"title":"ch02_basics/moving_avg.py TypeError: Can not convert a float32 into a Tensor. ","user":{"login":"AlexPetit12","id":10928305,"avatar_url":"https://avatars3.githubusercontent.com/u/10928305?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexPetit12","html_url":"https://github.com/AlexPetit12","followers_url":"https://api.github.com/users/AlexPetit12/followers","following_url":"https://api.github.com/users/AlexPetit12/following{/other_user}","gists_url":"https://api.github.com/users/AlexPetit12/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexPetit12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexPetit12/subscriptions","organizations_url":"https://api.github.com/users/AlexPetit12/orgs","repos_url":"https://api.github.com/users/AlexPetit12/repos","events_url":"https://api.github.com/users/AlexPetit12/events{/privacy}","received_events_url":"https://api.github.com/users/AlexPetit12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-10T22:34:48Z","updated_at":"2018-03-10T22:34:48Z","closed_at":null,"author_association":"NONE","body":"Hi, \r\n\r\nI am trying to reproduce your exponential moving average example but I get the error \"TypeError: Can not convert a float32 into a Tensor. \"\r\n\r\nI modified the lines \r\n\r\n```\r\n        summary_str, curr_value = sess.run([merged, update_avg], feed_dict={curr_value: raw_data[i]})\r\n        sess.run(tf.assign(prev_avg, curr_value))\r\n        print(raw_data[i], curr_value)\r\n```\r\n\r\nfor\r\n\r\n```\r\n        summary_str, curr_value_float = sess.run([merged, update_avg], feed_dict={curr_value: raw_data[i]})\r\n        sess.run(tf.assign(prev_avg, curr_value_float))\r\n        print(raw_data[i], curr_value_float)\r\n```\r\n\r\nto make things work, but I was wondering is this way the best solution or can we do better?\r\n\r\nThanks"}}
{"actor":{"display_login":"AlexPetit12"}}