{"action":"created","issue":{"url":"https://api.github.com/repos/aperwe/GANs/issues/1","repository_url":"https://api.github.com/repos/aperwe/GANs","labels_url":"https://api.github.com/repos/aperwe/GANs/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/aperwe/GANs/issues/1/comments","events_url":"https://api.github.com/repos/aperwe/GANs/issues/1/events","html_url":"https://github.com/aperwe/GANs/issues/1","id":325095329,"node_id":"MDU6SXNzdWUzMjUwOTUzMjk=","number":1,"title":"Error in sess = tf.Session() segment","user":{"login":"aperwe","id":26275607,"node_id":"MDQ6VXNlcjI2Mjc1NjA3","avatar_url":"https://avatars2.githubusercontent.com/u/26275607?v=4","gravatar_id":"","url":"https://api.github.com/users/aperwe","html_url":"https://github.com/aperwe","followers_url":"https://api.github.com/users/aperwe/followers","following_url":"https://api.github.com/users/aperwe/following{/other_user}","gists_url":"https://api.github.com/users/aperwe/gists{/gist_id}","starred_url":"https://api.github.com/users/aperwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aperwe/subscriptions","organizations_url":"https://api.github.com/users/aperwe/orgs","repos_url":"https://api.github.com/users/aperwe/repos","events_url":"https://api.github.com/users/aperwe/events{/privacy}","received_events_url":"https://api.github.com/users/aperwe/received_events","type":"User","site_admin":false},"labels":[{"id":934269844,"node_id":"MDU6TGFiZWw5MzQyNjk4NDQ=","url":"https://api.github.com/repos/aperwe/GANs/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-21T23:48:10Z","updated_at":"2018-05-31T00:55:10Z","closed_at":null,"author_association":"OWNER","body":"**Solve error:** \r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\n<ipython-input-5-b5c739df9f80> in <module>()\r\n     17 \r\n     18 #(g(z))\r\n---> 19 Gz = generator(batch_size, z_dimensions)\r\n     20 #Gz holds the generated images\r\n     21 \r\n\r\n<ipython-input-3-15af6e30ecf9> in generator(batch_size, z_dim)\r\n     14     #First deconv block\r\n     15     #3136 = 28 * 28 * 4\r\n---> 16     g_w1 = tf.get_variable('g_w1', [z_dim, 3136], dtype = tf.float32, initializer = tf.truncated_normal_initializer(stddev=0.02))\r\n     17     g_b1 = tf.get_variable('g_b1', [3136], initializer = tf.truncated_normal_initializer(stddev = 0.02))\r\n     18     g1 = tf.matmul(z, g_w1) + g_b1\r\n\r\nE:\\Artur\\Development\\Anaconda3\\envs\\MachineLearningPython3\\lib\\site-packages\\tensorflow\\python\\ops\\variable_scope.py in get_variable(name, shape, dtype, initializer, regularizer, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter, constraint)\r\n   1315       partitioner=partitioner, validate_shape=validate_shape,\r\n   1316       use_resource=use_resource, custom_getter=custom_getter,\r\n-> 1317       constraint=constraint)\r\n   1318 get_variable_or_local_docstring = (\r\n   1319     \"\"\"%s\r\n\r\nE:\\Artur\\Development\\Anaconda3\\envs\\MachineLearningPython3\\lib\\site-packages\\tensorflow\\python\\ops\\variable_scope.py in get_variable(self, var_store, name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter, constraint)\r\n   1077           partitioner=partitioner, validate_shape=validate_shape,\r\n   1078           use_resource=use_resource, custom_getter=custom_getter,\r\n-> 1079           constraint=constraint)\r\n   1080 \r\n   1081   def _get_partitioned_variable(self,\r\n\r\nE:\\Artur\\Development\\Anaconda3\\envs\\MachineLearningPython3\\lib\\site-packages\\tensorflow\\python\\ops\\variable_scope.py in get_variable(self, name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter, constraint)\r\n    423           caching_device=caching_device, partitioner=partitioner,\r\n    424           validate_shape=validate_shape, use_resource=use_resource,\r\n--> 425           constraint=constraint)\r\n    426 \r\n    427   def _get_partitioned_variable(\r\n\r\nE:\\Artur\\Development\\Anaconda3\\envs\\MachineLearningPython3\\lib\\site-packages\\tensorflow\\python\\ops\\variable_scope.py in _true_getter(name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource, constraint)\r\n    392           trainable=trainable, collections=collections,\r\n    393           caching_device=caching_device, validate_shape=validate_shape,\r\n--> 394           use_resource=use_resource, constraint=constraint)\r\n    395 \r\n    396     if custom_getter is not None:\r\n\r\nE:\\Artur\\Development\\Anaconda3\\envs\\MachineLearningPython3\\lib\\site-packages\\tensorflow\\python\\ops\\variable_scope.py in _get_single_variable(self, name, shape, dtype, initializer, regularizer, partition_info, reuse, trainable, collections, caching_device, validate_shape, use_resource, constraint)\r\n    731                          \"reuse=tf.AUTO_REUSE in VarScope? \"\r\n    732                          \"Originally defined at:\\n\\n%s\" % (\r\n--> 733                              name, \"\".join(traceback.format_list(tb))))\r\n    734       found_var = self._vars[name]\r\n    735       if not shape.is_compatible_with(found_var.get_shape()):\r\n\r\n**ValueError: Variable g_w1 already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope?** Originally defined at:\r\n\r\n  File \"E:\\Artur\\Development\\Anaconda3\\envs\\MachineLearningPython3\\lib\\site-packages\\tensorflow\\python\\framework\\ops.py\", line 1718, in __init__\r\n    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access\r\n  File \"E:\\Artur\\Development\\Anaconda3\\envs\\MachineLearningPython3\\lib\\site-packages\\tensorflow\\python\\framework\\ops.py\", line 3392, in create_op\r\n    op_def=op_def)\r\n  File \"E:\\Artur\\Development\\Anaconda3\\envs\\MachineLearningPython3\\lib\\site-packages\\tensorflow\\python\\framework\\op_def_library.py\", line 787, in _apply_op_helper\r\n    op_def=op_def)"},"comment":{"url":"https://api.github.com/repos/aperwe/GANs/issues/comments/393366513","html_url":"https://github.com/aperwe/GANs/issues/1#issuecomment-393366513","issue_url":"https://api.github.com/repos/aperwe/GANs/issues/1","id":393366513,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzM2NjUxMw==","user":{"login":"aperwe","id":26275607,"node_id":"MDQ6VXNlcjI2Mjc1NjA3","avatar_url":"https://avatars2.githubusercontent.com/u/26275607?v=4","gravatar_id":"","url":"https://api.github.com/users/aperwe","html_url":"https://github.com/aperwe","followers_url":"https://api.github.com/users/aperwe/followers","following_url":"https://api.github.com/users/aperwe/following{/other_user}","gists_url":"https://api.github.com/users/aperwe/gists{/gist_id}","starred_url":"https://api.github.com/users/aperwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aperwe/subscriptions","organizations_url":"https://api.github.com/users/aperwe/orgs","repos_url":"https://api.github.com/users/aperwe/repos","events_url":"https://api.github.com/users/aperwe/events{/privacy}","received_events_url":"https://api.github.com/users/aperwe/received_events","type":"User","site_admin":false},"created_at":"2018-05-31T00:55:10Z","updated_at":"2018-05-31T00:55:10Z","author_association":"OWNER","body":"Fixed with\r\nJedna poprawka z reuse variables naprawiła jeden fragment kodu:\r\ntrzeba zmienić\r\nwith tf.variable_scope(tf.get_variable_scope()) as scope:\r\nna\r\nwith tf.variable_scope(tf.get_variable_scope(), reuse = tf.AUTO_REUSE) as scope:"}}
{"actor":{"display_login":"aperwe"}}