Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to execute completely #12

Open
srinathdwivedi opened this issue Jun 27, 2018 · 9 comments
Open

unable to execute completely #12

srinathdwivedi opened this issue Jun 27, 2018 · 9 comments

Comments

@srinathdwivedi
Copy link

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)
in ()
1 model = tf.train.latest_checkpoint(model_dir)
----> 2 saver.restore(sess, model)

/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: returned a result with an error set

i would like to know why it is occurring is there any sequence to run different models?

@ProxyCausal
Copy link

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)]]

@Sshanu
Copy link
Owner

Sshanu commented Jul 2, 2018

are you using python3?

@ProxyCausal
Copy link

ProxyCausal commented Jul 2, 2018 via email

@srinathdwivedi
Copy link
Author

yes i also using python3

@Sshanu
Copy link
Owner

Sshanu commented Jul 2, 2018

#9

@Sshanu
Copy link
Owner

Sshanu commented Jul 2, 2018

someone was also facing the same issue, you can ask them

@zy158
Copy link

zy158 commented May 14, 2019

@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?

@damao666
Copy link

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
word_embedding_saver.restore(sess, latest_embd)
File "C:\Users\damao\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\saver.py", line 1769, in restore
raise ValueError("Can't load save_path when it is None.")
ValueError: Can't load save_path when it is None.

@radhikagupta6
Copy link

Facing the same problem :

ValueError Traceback (most recent call last)
in ()
1 model = tf.train.latest_checkpoint(model_dir)
----> 2 saver.restore(sess, model)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants