-
Notifications
You must be signed in to change notification settings - Fork 633
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
tensorflow error #237
Comments
modified code from future import absolute_import, division, print_function only keep warnings and errorsimport os import numpy as np from monodepth_model import * mode='train' checkpoint_path='/checkpoint/'checkpoint_path='' params = monodepth_parameters( def post_process_disparity(disp): def count_text_lines(file_path): global_step = tf.Variable(0, trainable=False) OPTIMIZERnum_training_samples = count_text_lines(filenames_file) steps_per_epoch = np.ceil(num_training_samples / params.batch_size).astype(np.int32) boundaries = [np.int32((3 / 5) * num_total_steps), np.int32((4 / 5) * num_total_steps)] opt_step = tf.train.AdamOptimizer(learning_rate) print("total number of samples: {}".format(num_training_samples)) dataloader = MonodepthDataloader(data_path, filenames_file, params, dataset, mode) split for each gpuleft_splits = tf.split(left, num_gpus, 0) tower_grads = [] with tf.variable_scope(tf.get_variable_scope()):
grads = average_gradients(tower_grads) apply_gradient_op = opt_step.apply_gradients(grads, global_step=global_step) total_loss = tf.reduce_mean(tower_losses) tf.summary.scalar('learning_rate', learning_rate, ['model_0']) SESSIONconfig = tf.ConfigProto(allow_soft_placement=True) SAVERsummary_writer = tf.summary.FileWriter(log_directory + '/' + model_name, sess.graph) COUNT PARAMStotal_num_parameters = 0 INITsess.run(tf.global_variables_initializer()) LOAD CHECKPOINT IF SETif checkpoint_path != '':
GO!start_step = global_step.eval(session=sess) train_saver.save(sess, log_directory + '/' + model_name + '/model', global_step=num_total_steps) |
Hi @seoluck77 . Did you make any progress with this issue? Thanks for response |
Hi, I am getting the same error. Yes please, would be nice to know progress with this issue. Thank you! |
if you need this code, i help you |
Hey, If you solve this error then please tell me how do you resolve this? Thank you! |
Hey, If you solve this error then please tell me how do you resolve this? Thank you very much! |
I have solved this error. Still exists after converting the picture PNG format, the corresponding in the training file Png delete. |
@yerongguang how you solved ? could you please clarify? |
Traceback (most recent call last):
File "C:\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1365, in _do_call
return fn(*args)
File "C:\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1350, in _run_fn
target_list, run_metadata)
File "C:\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1443, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.OutOfRangeError: RandomShuffleQueue '_1_shuffle_batch/random_shuffle_queue' is closed and has insufficient elements (requested 8, current size 0)
[[{{node shuffle_batch}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/HONG IL/Desktop/Work_2/monodepth-master/something.py", line 163, in
_, loss_value = sess.run([apply_gradient_op, total_loss])
File "C:\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 956, in run
run_metadata_ptr)
File "C:\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1180, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1359, in _do_run
run_metadata)
File "C:\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1384, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.OutOfRangeError: RandomShuffleQueue '_1_shuffle_batch/random_shuffle_queue' is closed and has insufficient elements (requested 8, current size 0)
[[node shuffle_batch (defined at \Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\framework\ops.py:1748) ]]
Original stack trace for 'shuffle_batch':
File "/Users/HONG IL/Desktop/Work_2/monodepth-master/something.py", line 95, in
dataloader = MonodepthDataloader(data_path, filenames_file, params, dataset, mode)
File "\Users\HONG IL\Desktop\Work_2\monodepth-master\monodepth_dataloader.py", line 70, in init
params.num_threads)
File "\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 324, in new_func
return func(*args, **kwargs)
File "\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\training\input.py", line 1347, in shuffle_batch
name=name)
File "\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\training\input.py", line 874, in _shuffle_batch
dequeued = queue.dequeue_many(batch_size, name=name)
File "\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\ops\data_flow_ops.py", line 489, in dequeue_many
self._queue_ref, n=n, component_types=self._dtypes, name=name)
File "\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\ops\gen_data_flow_ops.py", line 3862, in queue_dequeue_many_v2
timeout_ms=timeout_ms, name=name)
File "\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\framework\op_def_library.py", line 794, in _apply_op_helper
op_def=op_def)
File "\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3357, in create_op
attrs, op_def, compute_device)
File "\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3426, in _create_op_internal
op_def=op_def)
File "\Users\HONG IL\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1748, in init
self._traceback = tf_stack.extract_stack()
I modified the code a bit for learning, but an error occurred and could not be executed. I would like help for this error. Thank you. I always look good papers.
The text was updated successfully, but these errors were encountered: