Relation-Classification-using-Bidirectional-LSTM-Tree
Relation-Classification-using-Bidirectional-LSTM-Tree copied to clipboard
unable to execute completely
i am trying to run modelv1. now at following stage new error is occurring: model = tf.train.latest_checkpoint(model_dir) saver.restore(sess, model) error: INFO:tensorflow:Restoring parameters from None
TypeError Traceback (most recent call last) TypeError: expected bytes, NoneType found
The above exception was the direct cause of the following exception:
SystemError Traceback (most recent call last)
/home/snd/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py in restore(self, sess, save_path) 1546 logging.info("Restoring parameters from %s", save_path) 1547 sess.run(self.saver_def.restore_op_name, -> 1548 {self.saver_def.filename_tensor_name: save_path}) 1549 1550 @staticmethod
/home/snd/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py in run(self, fetches, feed_dict, options, run_metadata) 787 try: 788 result = self._run(None, fetches, feed_dict, options_ptr, --> 789 run_metadata_ptr) 790 if run_metadata: 791 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
/home/snd/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py in _run(self, handle, fetches, feed_dict, options, run_metadata) 995 if final_fetches or final_targets: 996 results = self._do_run(handle, final_targets, final_fetches, --> 997 feed_dict_string, options, run_metadata) 998 else: 999 results = []
/home/snd/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata) 1130 if handle is None: 1131 return self._do_call(_run_fn, self._session, feed_dict, fetch_list, -> 1132 target_list, options, run_metadata) 1133 else: 1134 return self._do_call(_prun_fn, self._session, handle, feed_dict,
/home/snd/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py in _do_call(self, fn, *args) 1137 def _do_call(self, fn, *args): 1138 try: -> 1139 return fn(*args) 1140 except errors.OpError as e: 1141 message = compat.as_text(e.message)
/home/snd/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py in _run_fn(session, feed_dict, fetch_list, target_list, options, run_metadata) 1119 return tf_session.TF_Run(session, options, 1120 feed_dict, fetch_list, target_list, -> 1121 status, run_metadata) 1122 1123 def _prun_fn(session, handle, feed_dict, fetch_list):
SystemError: <built-in function TF_Run> returned a result with an error set
i would like to know why it is occurring is there any sequence to run different models?
got a different error:
Can't load save_path when it is None.
although i think thats because its the first time training and there is no saved model yet
since training involves saver.save(sess, model_dir + '/model')
so i skipped running that cell and ran all below, and got another error:
InvalidArgumentError: Inputs to operation gradients_1/AddN_973 of type AddN must have the same size and shape. Input 0: [2,7,1,100] != input 1: [2,1,1,100] [[Node: gradients_1/AddN_973 = AddN[N=6, T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"](gradients_1/while_62/Merge_7_grad/Switch:1, gradients_1/while_62/lstm_btup/while_2/strided_slice/Enter_grad/b_acc_2, gradients_1/while_62/lstm_btup/while_5/while/strided_slice/Enter_grad/b_acc_2, gradients_1/while_62/lstm_btup/while_1/strided_slice/Enter_grad/b_acc_2, gradients_1/while_62/lstm_btup/while_3/strided_slice/Enter_grad/b_acc_2, gradients_1/while_62/lstm_btup/while_4/while/strided_slice/Enter_grad/b_acc_2)]] [[Node: gradients_1/Switch_1319/_5281 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_94916_gradients_1/Switch_1319", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](^_cloopgradients_1/hidden_layer_seq/while_9/cond/concat_grad/ShapeN/StackPushV2_1/Switch/_164)]]
are you using python3?
Yes
On Mon, Jul 2, 2018, 4:31 AM Shanu Kumar [email protected] wrote:
are you using python3?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Sshanu/Relation-Classification/issues/12#issuecomment-401711267, or mute the thread https://github.com/notifications/unsubscribe-auth/AmSqYBU4N2IVs73FyIh-6d_F_Yk_COqHks5uCdpjgaJpZM4U5OpL .
yes i also using python3
https://github.com/Sshanu/Relation-Classification/issues/9
someone was also facing the same issue, you can ask them
@ProxyCasual Hi, have you solved the problem you meet? Input 0: [2,7,1,100] != input 1: [2,1,1,100]. How did you solve it?
Have you solved this problem? I have the same problem.
Traceback (most recent call last):
File "D:/test/Relation-Classification-using-Bidirectional-LSTM-Tree-master/LCA Shortest Path/modelv4.py", line 249, in
Facing the same problem :
ValueError Traceback (most recent call last)
F:\anaconda\lib\site-packages\tensorflow\python\training\saver.py in restore(self, sess, save_path) 1272 return 1273 if save_path is None: -> 1274 raise ValueError("Can't load save_path when it is None.") 1275 1276 if not checkpoint_management.checkpoint_exists(compat.as_text(save_path)):
ValueError: Can't load save_path when it is None.
Please help I am new learner.