{"action":"created","issue":{"url":"https://api.github.com/repos/awjuliani/DeepRL-Agents/issues/2","repository_url":"https://api.github.com/repos/awjuliani/DeepRL-Agents","labels_url":"https://api.github.com/repos/awjuliani/DeepRL-Agents/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/awjuliani/DeepRL-Agents/issues/2/comments","events_url":"https://api.github.com/repos/awjuliani/DeepRL-Agents/issues/2/events","html_url":"https://github.com/awjuliani/DeepRL-Agents/issues/2","id":188223011,"number":2,"title":"Something wrong with Contextual-Policy.ipython","user":{"login":"liruihao","id":11754743,"avatar_url":"https://avatars.githubusercontent.com/u/11754743?v=3","gravatar_id":"","url":"https://api.github.com/users/liruihao","html_url":"https://github.com/liruihao","followers_url":"https://api.github.com/users/liruihao/followers","following_url":"https://api.github.com/users/liruihao/following{/other_user}","gists_url":"https://api.github.com/users/liruihao/gists{/gist_id}","starred_url":"https://api.github.com/users/liruihao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liruihao/subscriptions","organizations_url":"https://api.github.com/users/liruihao/orgs","repos_url":"https://api.github.com/users/liruihao/repos","events_url":"https://api.github.com/users/liruihao/events{/privacy}","received_events_url":"https://api.github.com/users/liruihao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-09T11:19:00Z","updated_at":"2016-11-09T21:22:59Z","closed_at":null,"body":"Dear Arthur,\r\n\r\nI am following your tutorials for reinforcement learning. It is very helpful. However, when I try to run \"Contextual-Policy.ipython\", I encounter some problems. Could you tell me how to solve it?\r\n\r\n--------------------------------------------------------------------------------------\r\n`TypeError                                 Traceback (most recent call last)\r\n<ipython-input-4-fa8ab4562b02> in <module>()\r\n      2 \r\n      3 cBandit = contextual_bandit() #Load the bandits.\r\n----> 4 myAgent = agent(lr=0.001,s_size=cBandit.num_bandits,a_size=cBandit.num_actions) #Load the agent.\r\n      5 weights = tf.trainable_variables()[0] #The weights we will evaluate to look into the network.\r\n      6 \r\n\r\n<ipython-input-3-c0d40cb83ada> in __init__(self, lr, s_size, a_size)\r\n      4         self.state_in= tf.placeholder(shape=[1],dtype=tf.int32)\r\n      5         state_in_OH = slim.one_hot_encoding(self.state_in,s_size)\r\n----> 6         output = slim.fully_connected(state_in_OH,a_size,            biases_initializer=None,activation_fn=tf.nn.sigmoid,weights_initializer=tf.ones)\r\n      7         self.output = tf.reshape(output,[-1])\r\n      8         self.chosen_action = tf.argmax(self.output,0)\r\n\r\n/home/rlig/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.pyc in func_with_args(*args, **kwargs)\r\n    175       current_args = current_scope[key_func].copy()\r\n    176       current_args.update(kwargs)\r\n--> 177     return func(*args, **current_args)\r\n    178   _add_op(func)\r\n    179   setattr(func_with_args, '_key_op', _key_op(func))\r\n\r\n/home/rlig/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/layers.pyc in fully_connected(inputs, num_outputs, activation_fn, normalizer_fn, normalizer_params, weights_initializer, weights_regularizer, biases_initializer, biases_regularizer, reuse, variables_collections, outputs_collections, trainable, scope)\r\n    841                                        regularizer=weights_regularizer,\r\n    842                                        collections=weights_collections,\r\n--> 843                                        trainable=trainable)\r\n    844     if len(static_shape) > 2:\r\n    845       # Reshape inputs\r\n\r\n/home/rlig/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.pyc in func_with_args(*args, **kwargs)\r\n    175       current_args = current_scope[key_func].copy()\r\n    176       current_args.update(kwargs)\r\n--> 177     return func(*args, **current_args)\r\n    178   _add_op(func)\r\n    179   setattr(func_with_args, '_key_op', _key_op(func))\r\n\r\n/home/rlig/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.pyc in model_variable(name, shape, dtype, initializer, regularizer, trainable, collections, caching_device, device)\r\n    267                   initializer=initializer, regularizer=regularizer,\r\n    268                   trainable=trainable, collections=collections,\r\n--> 269                   caching_device=caching_device, device=device)\r\n    270 \r\n    271 \r\n`\r\n"},"comment":{"url":"https://api.github.com/repos/awjuliani/DeepRL-Agents/issues/comments/259530442","html_url":"https://github.com/awjuliani/DeepRL-Agents/issues/2#issuecomment-259530442","issue_url":"https://api.github.com/repos/awjuliani/DeepRL-Agents/issues/2","id":259530442,"user":{"login":"liruihao","id":11754743,"avatar_url":"https://avatars.githubusercontent.com/u/11754743?v=3","gravatar_id":"","url":"https://api.github.com/users/liruihao","html_url":"https://github.com/liruihao","followers_url":"https://api.github.com/users/liruihao/followers","following_url":"https://api.github.com/users/liruihao/following{/other_user}","gists_url":"https://api.github.com/users/liruihao/gists{/gist_id}","starred_url":"https://api.github.com/users/liruihao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liruihao/subscriptions","organizations_url":"https://api.github.com/users/liruihao/orgs","repos_url":"https://api.github.com/users/liruihao/repos","events_url":"https://api.github.com/users/liruihao/events{/privacy}","received_events_url":"https://api.github.com/users/liruihao/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T21:22:59Z","updated_at":"2016-11-09T21:22:59Z","body":"Dear Arthur,\r\n\r\nThank you very much for your reply. I installed the tensorflow-0.11.0rc2 with python2.7 in Ubuntu/Linux 64-bit. CUDA8.0 and CuDNNv5 are installed for GPU.\r\n\r\nThank you very much for your time.\r\n\r\nRegards,\r\nRuihao \r\n"}}
{"actor":{"display_login":"liruihao"}}