{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensor2tensor/issues/457","repository_url":"https://api.github.com/repos/tensorflow/tensor2tensor","labels_url":"https://api.github.com/repos/tensorflow/tensor2tensor/issues/457/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensor2tensor/issues/457/comments","events_url":"https://api.github.com/repos/tensorflow/tensor2tensor/issues/457/events","html_url":"https://github.com/tensorflow/tensor2tensor/issues/457","id":278861007,"number":457,"title":"problem about exporting model after train","user":{"login":"yuimo","id":22741826,"avatar_url":"https://avatars1.githubusercontent.com/u/22741826?v=4","gravatar_id":"","url":"https://api.github.com/users/yuimo","html_url":"https://github.com/yuimo","followers_url":"https://api.github.com/users/yuimo/followers","following_url":"https://api.github.com/users/yuimo/following{/other_user}","gists_url":"https://api.github.com/users/yuimo/gists{/gist_id}","starred_url":"https://api.github.com/users/yuimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuimo/subscriptions","organizations_url":"https://api.github.com/users/yuimo/orgs","repos_url":"https://api.github.com/users/yuimo/repos","events_url":"https://api.github.com/users/yuimo/events{/privacy}","received_events_url":"https://api.github.com/users/yuimo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-12-04T03:37:57Z","updated_at":"2018-05-04T02:25:37Z","closed_at":"2017-12-05T01:34:10Z","author_association":"NONE","body":"hi, i have train my model, and it works well. but when i add \"--export_saved_model=True\" to the t2t-trainer, it reports a error,\r\nthe command is below:\r\n**t2t-trainer  --data_dir=/home/devops/yuimo/mt/translate_zhen_wmtun_base32k/t2t_data --t2t_usr_dir=/home/devops/yuimo/mt/code/t2t_wmt_zhen/data_generators --tmp_dir=/home/devops/yuimo/mt/translate_zhen_wmtun_base32k/t2t_data/original --problems=translate_zhen_wmtun_base32k --model=transformer --hparams_set=transformer_zhen_wmtun_base32k --output_dir=/home/devops/yuimo/mt/translate_zhen_wmtun_base32k/t2t_data/base --train_steps=5 --eval_steps=50  --keep_checkpoint_max=200 --save_checkpoints_secs=3600 --export_saved_model=True**\r\n\r\n\r\ndoes any body know how to resolve this?\r\nthanks a lot.\r\n\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/experiment.py\", line 744, in _maybe_export\r\n    eval_result=eval_result))\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/export_strategy.py\", line 87, in export\r\n    return self.export_fn(estimator, export_path, **kwargs)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/utils/saved_model_export_utils.py\", line 442, in export_fn\r\n    checkpoint_path=checkpoint_path)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/estimator/estimator.py\", line 532, in export_savedmodel\r\n    sharded=True)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py\", line 1218, in __init__\r\n    self.build()\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py\", line 1227, in build\r\n    self._build(self._filename, build_save=True, build_restore=True)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py\", line 1263, in _build\r\n    build_save=build_save, build_restore=build_restore)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py\", line 742, in _build_internal\r\n    save_tensor = self._AddShardedSaveOps(filename_tensor, per_device)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py\", line 381, in _AddShardedSaveOps\r\n    return self._AddShardedSaveOpsForV2(filename_tensor, per_device)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py\", line 353, in _AddShardedSaveOpsForV2\r\n    num_shards_tensor)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py\", line 284, in sharded_filename\r\n    return gen_io_ops._sharded_filename(filename_tensor, shard, num_shards)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_io_ops.py\", line 1196, in _sharded_filename\r\n    num_shards=num_shards, name=name)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py\", line 787, in _apply_op_helper\r\n    op_def=op_def)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py\", line 2956, in create_op\r\n    op_def=op_def)\r\n  File \"/home/devops/yuimo/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py\", line 1470, in __init__\r\n    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access\r\n\r\nInvalidArgumentError (see above for traceback): Cannot assign a device for operation 'save/ShardedFilename_1': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.\r\nColocation Debug Info:\r\nColocation group had the following types and devices:\r\nIdentity: CPU\r\nShardedFilename: CPU\r\n         [[Node: save/ShardedFilename_1 = ShardedFilename[_device=\"/device:GPU:0\"](save/StringJoin, save/ShardedFilename_1/shard, save/num_shards)]]"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensor2tensor/issues/comments/386490988","html_url":"https://github.com/tensorflow/tensor2tensor/issues/457#issuecomment-386490988","issue_url":"https://api.github.com/repos/tensorflow/tensor2tensor/issues/457","id":386490988,"user":{"login":"Beautifulsunday","id":33595478,"avatar_url":"https://avatars0.githubusercontent.com/u/33595478?v=4","gravatar_id":"","url":"https://api.github.com/users/Beautifulsunday","html_url":"https://github.com/Beautifulsunday","followers_url":"https://api.github.com/users/Beautifulsunday/followers","following_url":"https://api.github.com/users/Beautifulsunday/following{/other_user}","gists_url":"https://api.github.com/users/Beautifulsunday/gists{/gist_id}","starred_url":"https://api.github.com/users/Beautifulsunday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Beautifulsunday/subscriptions","organizations_url":"https://api.github.com/users/Beautifulsunday/orgs","repos_url":"https://api.github.com/users/Beautifulsunday/repos","events_url":"https://api.github.com/users/Beautifulsunday/events{/privacy}","received_events_url":"https://api.github.com/users/Beautifulsunday/received_events","type":"User","site_admin":false},"created_at":"2018-05-04T02:25:37Z","updated_at":"2018-05-04T02:25:37Z","author_association":"NONE","body":"hello , I am a student in university . My major is Mechanic Engineering, but l want to join AI. I making a translate model now and I have much trouble. I think i need you help. Can you give me a hand. I am training my model of translate_zhen_wmtun_base32k. oh, I just have a cpu...... so , i want to have a pre-trained transformer checkpoints of translate_zhen_wmtun_base32k. Can you help me ?"}}
{"actor":{"display_login":"Beautifulsunday"}}