{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1997","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1997/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1997/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1997/events","html_url":"https://github.com/tensorflow/tensorflow/issues/1997","id":148934199,"number":1997,"title":"Training accuracy falling down after some epoches since upgrading to 0.8.0rc0","user":{"login":"mrphoenix13","id":9256665,"avatar_url":"https://avatars.githubusercontent.com/u/9256665?v=3","gravatar_id":"","url":"https://api.github.com/users/mrphoenix13","html_url":"https://github.com/mrphoenix13","followers_url":"https://api.github.com/users/mrphoenix13/followers","following_url":"https://api.github.com/users/mrphoenix13/following{/other_user}","gists_url":"https://api.github.com/users/mrphoenix13/gists{/gist_id}","starred_url":"https://api.github.com/users/mrphoenix13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrphoenix13/subscriptions","organizations_url":"https://api.github.com/users/mrphoenix13/orgs","repos_url":"https://api.github.com/users/mrphoenix13/repos","events_url":"https://api.github.com/users/mrphoenix13/events{/privacy}","received_events_url":"https://api.github.com/users/mrphoenix13/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-17T09:19:16Z","updated_at":"2016-04-18T04:29:04Z","closed_at":null,"body":"I'm trying to use a simple network to classify some 64*64 images. in v0.7 it worked fine and consistent. The training phase was showing a consistent  average growth in accuracy. But since I'm trying to use 0.8, the accuracy fall down occasionally from ~0.9 to ~0!\r\nI'm using cpu  version for python 2.7\r\n\r\nis it a bug in TF or I'm doing something wrong?\r\n#############################################\r\n### Environment info\r\nOperating System: Ubuntu 14.04\r\nI've installed pip with the following command : sudo apt-get install python-pip python-dev\r\n\r\n2. The output from python -c \"import tensorflow; print(tensorflow.__version__)\".\r\n0.8.0rc0\r\n#############################################\r\n### my learning code is as below:\r\n\r\nsess = tf.InteractiveSession()\r\n\r\nx = tf.placeholder(tf.float32, shape=[None, 64,64])\r\ny_ = tf.placeholder(tf.float32, shape=[None, 31])\r\ninput = tf.reshape(x,shape=[-1,64*64])\r\nw1 = tf.Variable(tf.random_uniform([64*64,128],minval=-0.1,maxval=0.1),dtype=tf.float32)\r\nb1 = tf.Variable(tf.random_uniform([128],minval=-0.1,maxval=0.1),dtype=tf.float32);\r\ny1_ = tf.nn.softmax(tf.matmul(input, w1) + b1)\r\nkeep_prob = tf.placeholder(tf.float32)\r\ny1 = tf.nn.dropout(y1_, keep_prob)\r\nw2 = tf.Variable(tf.random_uniform([128,31],minval=-0.1,maxval=0.1),dtype=tf.float32)\r\nb2 = tf.Variable(tf.random_uniform([31],minval=-0.1,maxval=0.1),dtype=tf.float32);\r\ny2 = tf.nn.softmax(tf.matmul(y1, w2) + b2)\r\ncross_entropy = -tf.reduce_sum(y_*tf.log(y2))\r\nlearn_rate = tf.placeholder(tf.float32)\r\ntrain_step = tf.train.AdamOptimizer(learn_rate).minimize(cross_entropy)\r\ncorrect_prediction = tf.equal(tf.argmax(y2,1), tf.argmax(y_,1))\r\naccuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))\r\nsess.run(tf.initialize_all_variables())\r\nd = Dataset()\r\ndat = d.load()\r\nfor i in range(9000):\r\n    if i%200==0:\r\n        a = accuracy.eval(feed_dict={x: dat.data, y_: dat.label,keep_prob: 1.0,learn_rate:1e-2})\r\n        print(\"step %d, training accuracy %g\" % (i, a))\r\n    train_step.run(feed_dict={x: dat.data, y_: dat.label,keep_prob: 0.8 ,learn_rate:1e-2})\r\n\r\nfor i in range(5000):\r\n    if i%100==0:\r\n        a = accuracy.eval(feed_dict={x: dat.data, y_: dat.label,keep_prob: 1.0,learn_rate:1e-3})\r\n        print(\"step %d, training accuracy %g\" % (i, a))\r\n    train_step.run(feed_dict={x: dat.data, y_: dat.label,keep_prob: 0.8,learn_rate:1e-3 })\r\n\r\n==========================\r\nsome line of the output is as below:\r\nstep 7400, training accuracy 0.870539\r\nstep 7600, training accuracy 0.875406\r\nstep 7800, training accuracy 0.877677\r\nstep 8000, training accuracy 0.882868\r\nstep 8200, training accuracy 0.884491\r\nstep 8400, training accuracy 0.887735\r\nstep 8600, training accuracy 0.888709\r\nstep 8800, training accuracy 0.893251\r\nstep 0, training accuracy 0.894549\r\nstep 100, training accuracy 0.895198\r\nstep 200, training accuracy 0.894873\r\nstep 300, training accuracy 0.895198\r\nstep 400, training accuracy 0.894873\r\nstep 500, training accuracy 0.895198\r\nstep 600, training accuracy 0.895198\r\nstep 700, training accuracy 0.895522\r\nstep 800, training accuracy 0.895522\r\nstep 900, training accuracy 0.895847\r\nstep 1000, training accuracy 0.896171\r\nstep 1100, training accuracy 0.896171\r\nstep 1200, training accuracy 0.896496\r\nstep 1300, training accuracy 0.89682\r\nstep 1400, training accuracy 0\r\nstep 1500, training accuracy 0\r\nstep 1600, training accuracy 0\r\nstep 1700, training accuracy 0"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/211196687","html_url":"https://github.com/tensorflow/tensorflow/issues/1997#issuecomment-211196687","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1997","id":211196687,"user":{"login":"mrphoenix13","id":9256665,"avatar_url":"https://avatars.githubusercontent.com/u/9256665?v=3","gravatar_id":"","url":"https://api.github.com/users/mrphoenix13","html_url":"https://github.com/mrphoenix13","followers_url":"https://api.github.com/users/mrphoenix13/followers","following_url":"https://api.github.com/users/mrphoenix13/following{/other_user}","gists_url":"https://api.github.com/users/mrphoenix13/gists{/gist_id}","starred_url":"https://api.github.com/users/mrphoenix13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrphoenix13/subscriptions","organizations_url":"https://api.github.com/users/mrphoenix13/orgs","repos_url":"https://api.github.com/users/mrphoenix13/repos","events_url":"https://api.github.com/users/mrphoenix13/events{/privacy}","received_events_url":"https://api.github.com/users/mrphoenix13/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T04:29:04Z","updated_at":"2016-04-18T04:29:04Z","body":"The case is not about divergence of the learning accuracy. the first loop is using 0.01 as learning rate and the second one is using 0.001. In both cases it's not divergent (as you can see the accuracy is increasing). My problem is the accuracy of learning is falling to zero! And I'm experiencing this since I'm using 0.8rc0 in 0.7 I had no such problem."}}