{"action":"created","issue":{"url":"https://api.github.com/repos/YadiraF/GAN/issues/4","repository_url":"https://api.github.com/repos/YadiraF/GAN","labels_url":"https://api.github.com/repos/YadiraF/GAN/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/YadiraF/GAN/issues/4/comments","events_url":"https://api.github.com/repos/YadiraF/GAN/issues/4/events","html_url":"https://github.com/YadiraF/GAN/issues/4","id":248697839,"number":4,"title":"encounter ValueError when I \"python dcgan.py\"","user":{"login":"duduheihei","id":18009671,"avatar_url":"https://avatars3.githubusercontent.com/u/18009671?v=4","gravatar_id":"","url":"https://api.github.com/users/duduheihei","html_url":"https://github.com/duduheihei","followers_url":"https://api.github.com/users/duduheihei/followers","following_url":"https://api.github.com/users/duduheihei/following{/other_user}","gists_url":"https://api.github.com/users/duduheihei/gists{/gist_id}","starred_url":"https://api.github.com/users/duduheihei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duduheihei/subscriptions","organizations_url":"https://api.github.com/users/duduheihei/orgs","repos_url":"https://api.github.com/users/duduheihei/repos","events_url":"https://api.github.com/users/duduheihei/events{/privacy}","received_events_url":"https://api.github.com/users/duduheihei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-08T12:26:19Z","updated_at":"2017-08-15T03:43:39Z","closed_at":null,"body":"ValueError: Variable G_conv/Conv/weights does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?\r\n\r\nI wonder if I am the only one who meet this problem and I have been confused for days. I hope I can get some help.\r\n\r\n\r\nhere is the information\r\nTraceback (most recent call last):\r\n  File \"dcgan.py\", line 107, in <module>\r\n    dcgan = DCGAN(generator, discriminator, data)\r\n  File \"dcgan.py\", line 34, in __init__\r\n    self.D_real, _ = self.discriminator(self.X)\r\n  File \"/home/baiqiujian/github/GAN-master/nets.py\", line 146, in __call__\r\n    stride=2, activation_fn=lrelu)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/arg_scope.py\", line 181, in func_with_args\r\n    return func(*args, **current_args)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/layers.py\", line 947, in convolution\r\n    outputs = layer.apply(inputs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/layers/base.py\", line 492, in apply\r\n    return self.__call__(inputs, *args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/layers/base.py\", line 434, in __call__\r\n    self.build(input_shapes[0])\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/layers/convolutional.py\", line 137, in build\r\n    dtype=self.dtype)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/layers/base.py\", line 374, in add_variable\r\n    trainable=trainable and self.trainable)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 1065, in get_variable\r\n    use_resource=use_resource, custom_getter=custom_getter)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 962, in get_variable\r\n    use_resource=use_resource, custom_getter=custom_getter)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 360, in get_variable\r\n    validate_shape=validate_shape, use_resource=use_resource)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/layers.py\", line 1370, in layer_variable_getter\r\n    return _model_variable_getter(getter, *args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/layers.py\", line 1362, in _model_variable_getter\r\n    custom_getter=getter, use_resource=use_resource)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/arg_scope.py\", line 181, in func_with_args\r\n    return func(*args, **current_args)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/variables.py\", line 261, in model_variable\r\n    use_resource=use_resource)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/arg_scope.py\", line 181, in func_with_args\r\n    return func(*args, **current_args)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/variables.py\", line 216, in variable\r\n    use_resource=use_resource)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 352, in _true_getter\r\n    use_resource=use_resource)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py\", line 682, in _get_single_variable\r\n    \"VarScope?\" % name)\r\nValueError: Variable G_conv/Conv/weights does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?\r\n"},"comment":{"url":"https://api.github.com/repos/YadiraF/GAN/issues/comments/322369810","html_url":"https://github.com/YadiraF/GAN/issues/4#issuecomment-322369810","issue_url":"https://api.github.com/repos/YadiraF/GAN/issues/4","id":322369810,"user":{"login":"YadiraF","id":17000803,"avatar_url":"https://avatars3.githubusercontent.com/u/17000803?v=4","gravatar_id":"","url":"https://api.github.com/users/YadiraF","html_url":"https://github.com/YadiraF","followers_url":"https://api.github.com/users/YadiraF/followers","following_url":"https://api.github.com/users/YadiraF/following{/other_user}","gists_url":"https://api.github.com/users/YadiraF/gists{/gist_id}","starred_url":"https://api.github.com/users/YadiraF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YadiraF/subscriptions","organizations_url":"https://api.github.com/users/YadiraF/orgs","repos_url":"https://api.github.com/users/YadiraF/repos","events_url":"https://api.github.com/users/YadiraF/events{/privacy}","received_events_url":"https://api.github.com/users/YadiraF/received_events","type":"User","site_admin":false},"created_at":"2017-08-15T03:43:39Z","updated_at":"2017-08-15T03:43:39Z","body":"So sorry for my late reply, for I saw your issue just now (I haven't used computer over the last two weeks)\r\n\r\nAbout the error, you are right,  `reuse=False` can correct this.\r\n\r\nAnd it's all by my carelessness, I forgot to delete the file _net.py_ in the root folder, as the file _utils/net.py_ is the right one.  So the executed file dcgan.py just run the wrong code in _./net.py_ instead of right code in _./utils/net.py_.\r\n\r\nAnyway, I've just fixed this. Thank you very much for your reporting. :-D "}}
{"actor":{"display_login":"YadiraF"}}