{"action":"closed","issue":{"url":"https://api.github.com/repos/solivr/tf-crnn/issues/30","repository_url":"https://api.github.com/repos/solivr/tf-crnn","labels_url":"https://api.github.com/repos/solivr/tf-crnn/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/solivr/tf-crnn/issues/30/comments","events_url":"https://api.github.com/repos/solivr/tf-crnn/issues/30/events","html_url":"https://github.com/solivr/tf-crnn/issues/30","id":301983862,"number":30,"title":"Change the input_shape=(, )","user":{"login":"zdnet","id":1091809,"avatar_url":"https://avatars0.githubusercontent.com/u/1091809?v=4","gravatar_id":"","url":"https://api.github.com/users/zdnet","html_url":"https://github.com/zdnet","followers_url":"https://api.github.com/users/zdnet/followers","following_url":"https://api.github.com/users/zdnet/following{/other_user}","gists_url":"https://api.github.com/users/zdnet/gists{/gist_id}","starred_url":"https://api.github.com/users/zdnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdnet/subscriptions","organizations_url":"https://api.github.com/users/zdnet/orgs","repos_url":"https://api.github.com/users/zdnet/repos","events_url":"https://api.github.com/users/zdnet/events{/privacy}","received_events_url":"https://api.github.com/users/zdnet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-03T09:29:49Z","updated_at":"2018-05-18T16:25:23Z","closed_at":"2018-05-18T16:25:23Z","author_association":"NONE","body":"Hi,\r\ni want to change the parameters input_shape in train.py to size (45, 100), but have an exception, could you please help to check?\r\n\r\nInvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [768,1024] rhs shape= [1280,1024]\r\n\r\nThanks\r\n\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 97, in <module>\r\n    image_summaries=True))\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\estimator\\estimator.py\", line 314, in train\r\n    loss = self._train_model(input_fn, hooks, saving_listeners)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\estimator\\estimator.py\", line 815, in _train_model\r\n    _, loss = mon_sess.run([estimator_spec.train_op, estimator_spec.loss])\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\monitored_session.py\", line 539, in run\r\n    run_metadata=run_metadata)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\monitored_session.py\", line 1013, in run\r\n    run_metadata=run_metadata)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\monitored_session.py\", line 1089, in run\r\n    return self._sess.run(*args, **kwargs)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\monitored_session.py\", line 1161, in run\r\n    run_metadata=run_metadata)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\monitored_session.py\", line 941, in run\r\n    return self._sess.run(*args, **kwargs)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 895, in run\r\n    run_metadata_ptr)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 1128, in _run\r\n    feed_dict_tensor, options, run_metadata)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 1344, in _do_run\r\n    options, run_metadata)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 1350, in _do_call\r\n    return fn(*args)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 1329, in _run_fn\r\n    status, run_metadata)\r\nKeyboardInterrupt\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 1350, in _do_call\r\n    return fn(*args)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 1329, in _run_fn\r\n    status, run_metadata)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\framework\\errors_impl.py\", line 473, in __exit__\r\n    c_api.TF_GetCode(self.status.status))\r\ntensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [768,1024] rhs shape= [1280,1024]\r\n         [[Node: save/Assign_32 = Assign[T=DT_FLOAT, _class=[\"loc:@stack_bidirectional_rnn/cell_0/bidirectional_rnn/fw/basic_lstm_cell/kernel\"], use_locking=true, valida\r\nte_shape=true, _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"](stack_bidirectional_rnn/cell_0/bidirectional_rnn/fw/basic_lstm_cell/kernel, save/RestoreV2_32)]]\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 108, in <module>\r\n    preprocess_image_for_prediction(min_width=10))\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\estimator\\estimator.py\", line 550, in export_savedmodel\r\n    saver_for_restore.restore(session, checkpoint_path)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\saver.py\", line 1686, in restore\r\n    {self.saver_def.filename_tensor_name: save_path})\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 895, in run\r\n    run_metadata_ptr)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 1128, in _run\r\n    feed_dict_tensor, options, run_metadata)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 1344, in _do_run\r\n    options, run_metadata)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\client\\session.py\", line 1363, in _do_call\r\n    raise type(e)(node_def, op, message)\r\ntensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [768,1024] rhs shape= [1280,1024]\r\n         [[Node: save/Assign_32 = Assign[T=DT_FLOAT, _class=[\"loc:@stack_bidirectional_rnn/cell_0/bidirectional_rnn/fw/basic_lstm_cell/kernel\"], use_locking=true, valida\r\nte_shape=true, _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"](stack_bidirectional_rnn/cell_0/bidirectional_rnn/fw/basic_lstm_cell/kernel, save/RestoreV2_32)]]\r\n\r\nCaused by op 'save/Assign_32', defined at:\r\n  File \"train.py\", line 108, in <module>\r\n    preprocess_image_for_prediction(min_width=10))\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\estimator\\estimator.py\", line 549, in export_savedmodel\r\n    sharded=True)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\saver.py\", line 1239, in __init__\r\n    self.build()\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\saver.py\", line 1248, in build\r\n    self._build(self._filename, build_save=True, build_restore=True)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\saver.py\", line 1284, in _build\r\n    build_save=build_save, build_restore=build_restore)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\saver.py\", line 759, in _build_internal\r\n    restore_sequentially, reshape)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\saver.py\", line 471, in _AddShardedRestoreOps\r\n    name=\"restore_shard\"))\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\saver.py\", line 440, in _AddRestoreOps\r\n    assign_ops.append(saveable.restore(tensors, shapes))\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\training\\saver.py\", line 160, in restore\r\n    self.op.get_shape().is_fully_defined())\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\ops\\state_ops.py\", line 276, in assign\r\n    validate_shape=validate_shape)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\ops\\gen_state_ops.py\", line 62, in assign\r\n    use_locking=use_locking, name=name)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\framework\\op_def_library.py\", line 787, in _apply_op_helper\r\n    op_def=op_def)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\framework\\ops.py\", line 3160, in create_op\r\n    op_def=op_def)\r\n  File \"E:\\Anaconda3\\envs\\tensorflow-gpu\\lib\\site-packages\\tensorflow\\python\\framework\\ops.py\", line 1625, in __init__\r\n    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access\r\n\r\nInvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [768,1024] rhs shape= [1280,1024]\r\n         [[Node: save/Assign_32 = Assign[T=DT_FLOAT, _class=[\"loc:@stack_bidirectional_rnn/cell_0/bidirectional_rnn/fw/basic_lstm_cell/kernel\"], use_locking=true, valida\r\nte_shape=true, _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"](stack_bidirectional_rnn/cell_0/bidirectional_rnn/fw/basic_lstm_cell/kernel, save/RestoreV2_32)]]\r\n\r\n"}}
{"actor":{"display_login":"solivr"}}