{"action":"closed","issue":{"url":"https://api.github.com/repos/tensorflow/nmt/issues/352","repository_url":"https://api.github.com/repos/tensorflow/nmt","labels_url":"https://api.github.com/repos/tensorflow/nmt/issues/352/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/nmt/issues/352/comments","events_url":"https://api.github.com/repos/tensorflow/nmt/issues/352/events","html_url":"https://github.com/tensorflow/nmt/issues/352","id":334000293,"node_id":"MDU6SXNzdWUzMzQwMDAyOTM=","number":352,"title":"How to use the --ckpt command to restore model ","user":{"login":"yapingzhao","id":27772759,"node_id":"MDQ6VXNlcjI3NzcyNzU5","avatar_url":"https://avatars1.githubusercontent.com/u/27772759?v=4","gravatar_id":"","url":"https://api.github.com/users/yapingzhao","html_url":"https://github.com/yapingzhao","followers_url":"https://api.github.com/users/yapingzhao/followers","following_url":"https://api.github.com/users/yapingzhao/following{/other_user}","gists_url":"https://api.github.com/users/yapingzhao/gists{/gist_id}","starred_url":"https://api.github.com/users/yapingzhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yapingzhao/subscriptions","organizations_url":"https://api.github.com/users/yapingzhao/orgs","repos_url":"https://api.github.com/users/yapingzhao/repos","events_url":"https://api.github.com/users/yapingzhao/events{/privacy}","received_events_url":"https://api.github.com/users/yapingzhao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-20T09:40:48Z","updated_at":"2018-07-09T02:30:12Z","closed_at":"2018-07-09T02:30:12Z","author_association":"NONE","body":"Hi,\r\nI have a question: how can we train the model, so that it initializes the weights using the values from the checkpoint? In other words how do I fine-tune the model for a new dataset.\r\nIn the train.py file\r\n\"_with train_model.graph.as_default():\r\n     Loaded_train_model, global_step = model_helper.create_or_load_model(\r\n         Train_model.model, model_dir, train_sess, \"train\")_\"\r\nThe above content is modified to the following:\r\n\"_with tf.Session() as sess:\r\n     New_saver=tf.train.import_meta_graph('checkpoint_dir/MyModel-1000.meta')\r\n      New_saver.restore(sess,tf.train.latest_checkpoint('checkpoint_dir')_\"\r\nI am newbie of nmt.I do not know where there is a problem with the above method. In the end, I failed. \r\nI hope you can provide some suggestions.\r\nLooking forward to your advice or answers.\r\nBest regards,\r\nThank you very much!"}}
{"actor":{"display_login":"yapingzhao"}}