{"action":"created","issue":{"url":"https://api.github.com/repos/carpedm20/attentive-reader-tensorflow/issues/2","repository_url":"https://api.github.com/repos/carpedm20/attentive-reader-tensorflow","labels_url":"https://api.github.com/repos/carpedm20/attentive-reader-tensorflow/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/carpedm20/attentive-reader-tensorflow/issues/2/comments","events_url":"https://api.github.com/repos/carpedm20/attentive-reader-tensorflow/issues/2/events","html_url":"https://github.com/carpedm20/attentive-reader-tensorflow/issues/2","id":132759715,"number":2,"title":"Loading a check-pointed model?","user":{"login":"dandxy89","id":7694931,"avatar_url":"https://avatars.githubusercontent.com/u/7694931?v=3","gravatar_id":"","url":"https://api.github.com/users/dandxy89","html_url":"https://github.com/dandxy89","followers_url":"https://api.github.com/users/dandxy89/followers","following_url":"https://api.github.com/users/dandxy89/following{/other_user}","gists_url":"https://api.github.com/users/dandxy89/gists{/gist_id}","starred_url":"https://api.github.com/users/dandxy89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dandxy89/subscriptions","organizations_url":"https://api.github.com/users/dandxy89/orgs","repos_url":"https://api.github.com/users/dandxy89/repos","events_url":"https://api.github.com/users/dandxy89/events{/privacy}","received_events_url":"https://api.github.com/users/dandxy89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-10T17:05:41Z","updated_at":"2016-02-11T10:42:41Z","closed_at":null,"body":"I've trained a model and the model has saved in the correct folder.\r\n\r\nWhen running `python main.py --dataset cnn --forward_only True`\r\n\r\nI get the error:\r\n```Traceback (most recent call last):\r\n  File \"main.py\", line 63, in <module>\r\n    tf.app.run()\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/default/_app.py\", line 30, in run\r\n    sys.exit(main(sys.argv))\r\n  File \"main.py\", line 59, in main\r\n    model.load(sess, FLAGS.checkpoint_dir, FLAGS.dataset)\r\n  File \"/home/dan/Desktop/attentive-reader-tensorflow/model/base_model.py\", line 29, in load\r\n    self.saver = tf.train.Saver()\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py\", line 705, in __init__\r\n    raise ValueError(\"No variables to save\")````\r\n\r\nThis came after resolving another issue in `main.py`.\r\n\r\n`model.load(FLAGS.checkpoint_dir)` -> `model.load(sess, FLAGS.checkpoint_dir, FLAGS.dataset)`\r\n\r\nI believe that load function is not working as expected. I think that the likely cause for this is the Session has not initialized with any variables and hence cannot instantiate the TF Saver function, causing the error above.\r\n\r\nI plan to investigate further but want to see if you had an insight into this. Have you managed to load a model using this command?"},"comment":{"url":"https://api.github.com/repos/carpedm20/attentive-reader-tensorflow/issues/comments/182802291","html_url":"https://github.com/carpedm20/attentive-reader-tensorflow/issues/2#issuecomment-182802291","issue_url":"https://api.github.com/repos/carpedm20/attentive-reader-tensorflow/issues/2","id":182802291,"user":{"login":"carpedm20","id":3346407,"avatar_url":"https://avatars.githubusercontent.com/u/3346407?v=3","gravatar_id":"","url":"https://api.github.com/users/carpedm20","html_url":"https://github.com/carpedm20","followers_url":"https://api.github.com/users/carpedm20/followers","following_url":"https://api.github.com/users/carpedm20/following{/other_user}","gists_url":"https://api.github.com/users/carpedm20/gists{/gist_id}","starred_url":"https://api.github.com/users/carpedm20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carpedm20/subscriptions","organizations_url":"https://api.github.com/users/carpedm20/orgs","repos_url":"https://api.github.com/users/carpedm20/repos","events_url":"https://api.github.com/users/carpedm20/events{/privacy}","received_events_url":"https://api.github.com/users/carpedm20/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T10:42:41Z","updated_at":"2016-02-11T10:42:41Z","body":"@dandxy89 Thanks for noticing me this problem. Yes, you're right.\r\n\r\n    model.load(sess, FLAGS.checkpoint_dir, FLAGS.dataset)\r\n\r\nis the right solution and this should be fixed. Loading a model can be done anytime after the graph is defined and it is not related to initialization. Also, I want to let you know that this project is still in progress and only deep lstm reader is implemented right now."}}