Closed qzramiz closed 7 years ago
The discrete value mapping is: 'straight': 0, 'slow_or_stop': 1, 'turn_left': 2, 'turn_right': 3
For the second question, I've confirmed on my side again that it loads without any problem. Are you using tensor flow version 0.11?
for some sample image i get the logits as follows for discrete model: [array([[ 3.82829404, 1.39029431, 2.56422377, 1.37658787, -4.83812428, -4.90955925]] should i take the index as the discrete value mapping? because the values returned are floats I am using updated version of tensorflow.
Yes, the discrete model should output 6 numbers, but only the first 4 are useful. The remaining two are not used, but kept for compatibility reasons.
You could try to use version 0.11, since tensorflow has changed it's lstm implementation after that version and the saved checkpoint might thus be in-compatible.
Thank you very much :)
Two things i want to ask:
Firstly
Secondly
Stack Trace is given below. ` File "/home/rameez/Desktop/FYP/Code/BDD_Code/BDD_Driving_Model-master/wrapper.py", line 62, in init saver.restore(self.sess, model_path) File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1560, in restore {self.saver_def.filename_tensor_name: save_path}) File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 895, in run run_metadata_ptr) File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1124, in _run feed_dict_tensor, options, run_metadata) File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1321, in _do_run options, run_metadata) File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1340, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.NotFoundError: Tensor name "TrainStage1_discrete_fcn_lstm/rnn/multi_rnn_cell/cell_0/basic_lstm_cell/bias/ExponentialMovingAverage" not found in checkpoint files ./data/pre_trained/discrete_fcn_lstm/model.ckpt-315001.bestmodel [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
Caused by op u'save/RestoreV2', defined at: File "runner.py", line 11, in
20)
File "/home/rameez/Desktop/FYP/Code/BDD_Code/BDD_Driving_Model-master/wrapper.py", line 56, in init
saver = tf.train.Saver(variables_to_restore)
File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1140, in init
self.build()
File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1172, in build
filename=self._filename)
File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 688, in build
restore_sequentially, reshape)
File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 407, in _AddRestoreOps
tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 247, in restore_op
[spec.tensor.dtype])[0])
File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_io_ops.py", line 663, in restore_v2
dtypes=dtypes, name=name)
File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2630, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/home/rameez/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1204, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
NotFoundError (see above for traceback): Tensor name "TrainStage1_discrete_fcn_lstm/rnn/multi_rnn_cell/cell_0/basic_lstm_cell/bias/ExponentialMovingAverage" not found in checkpoint files ./data/pre_trained/discrete_fcn_lstm/model.ckpt-315001.bestmodel [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]`