Python constants.MAX_TIME_STEP Examples
The following are 3
code examples of constants.MAX_TIME_STEP().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
constants
, or try the search function
.
Example #1
Source File: train.py From icra2017-visual-navigation with MIT License | 6 votes |
def train_function(parallel_index): global global_t training_thread = training_threads[parallel_index] last_global_t = 0 scene, task = branches[parallel_index % NUM_TASKS] key = scene + "-" + task while global_t < MAX_TIME_STEP and not stop_requested: diff_global_t = training_thread.process(sess, global_t, summary_writer, summary_op[key], summary_placeholders[key]) global_t += diff_global_t # periodically save checkpoints to disk if parallel_index == 0 and global_t - last_global_t > 1000000: print('Save checkpoint at timestamp %d' % global_t) saver.save(sess, CHECKPOINT_DIR + '/' + 'checkpoint', global_step = global_t) last_global_t = global_t
Example #2
Source File: a3c.py From async_deep_reinforce with Apache License 2.0 | 6 votes |
def train_function(parallel_index): global global_t training_thread = training_threads[parallel_index] # set start_time start_time = time.time() - wall_t training_thread.set_start_time(start_time) while True: if stop_requested: break if global_t > MAX_TIME_STEP: break diff_global_t = training_thread.process(sess, global_t, summary_writer, summary_op, score_input) global_t += diff_global_t
Example #3
Source File: a3c.py From a3c-distributed_tensorflow with MIT License | 5 votes |
def train_function(parallel_index): global global_t training_thread = training_threads[parallel_index] # set start_time start_time = time.time() - wall_t training_thread.set_start_time(start_time) idx=1;total_score=0; while True: if stop_requested: break if global_t > MAX_TIME_STEP: break diff_global_t,score = training_thread.process(sess, global_t, summary_writer, summary_op, score_input) if(idx==100): total_score+=score; total_score=total_score/100.; print("Score: "+str(total_score)); idx=1; else: total_score+=score; idx+=1; global_t += diff_global_t