lr=configs.learning_rate, lr_decay_step=configs.lr_decay_step, lr_decay_rate=configs.lr_decay_rate) print("Network built!") # log_writer = tf.summary.FileWriter(logdir=log_dir, graph=sess.graph) model_saver = tf.train.Saver() net_init = tf.global_variables_initializer() sess.run([net_init]) # reload the model for cur_model_iterations in evaluation_models: if os.path.exists( configs.restore_model_path_fn(cur_model_iterations) + ".index"): print( "#######################Restored all weights ###########################" ) model_saver.restore( sess, configs.restore_model_path_fn(cur_model_iterations)) else: print(configs.restore_model_path_fn(cur_model_iterations)) print("The prev model is not existing!") quit() ##################### First get the depth scale from the subset of the training set ###################### cur_model_depth_scale = my_utils.mAverageCounter(shape=[1]) scale_data_index = my_utils.mRangeVariable(
# log_writer = tf.summary.FileWriter(logdir=log_dir, graph=sess.graph) model_saver = tf.train.Saver() net_init = tf.global_variables_initializer() sess.run([net_init]) # reload the model for cur_model_iterations in evaluation_models: pose_error_statistic = pose_error.mResultSaver() depth_eval = evaluators.mEvaluatorDepth(nJoints=configs.nJoints) coords_eval = evaluators.mEvaluatorPose3D(nJoints=configs.nJoints) data_index = my_utils.mRangeVariable(min_val=data_from, max_val=data_to-1, initial_val=data_from) if os.path.exists(configs.restore_model_path_fn(cur_model_iterations)+".index"): print("#######################Restored all weights ###########################") model_saver.restore(sess, configs.restore_model_path_fn(cur_model_iterations)) else: print(configs.restore_model_path_fn(cur_model_iterations)) print("The prev model is not existing!") quit() while not data_index.isEnd(): global_steps = sess.run(ordinal_model.global_steps) batch_images_np = np.zeros([configs.batch_size, configs.img_size, configs.img_size, 3], dtype=np.float32) batch_depth_np = np.zeros([configs.batch_size, configs.nJoints], dtype=np.float32) img_path_for_show = [] label_path_for_show = []