From 83e91e0a8effcd20466e56b6ecc3e349bbfa5e0e Mon Sep 17 00:00:00 2001 From: "jules@lens" Date: Tue, 24 Apr 2018 20:19:24 +0200 Subject: updates to tensorflow code and processing additions --- Code/tfutils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Code/tfutils.py') diff --git a/Code/tfutils.py b/Code/tfutils.py index 22baf95..0d2d8dd 100644 --- a/Code/tfutils.py +++ b/Code/tfutils.py @@ -92,12 +92,12 @@ def batch_pad_to_bounding_box(images, offset_height, offset_width, target_height rpad = np.zeros([batch_size, target_height, num_rpad, channels]) padded = images - if num_tpad > 0 and num_bpad > 0: padded = tf.concat(1, [tpad, padded, bpad]) - elif num_tpad > 0: padded = tf.concat(1, [tpad, padded]) - elif num_bpad > 0: padded = tf.concat(1, [padded, bpad]) - if num_lpad > 0 and num_rpad > 0: padded = tf.concat(2, [lpad, padded, rpad]) - elif num_lpad > 0: padded = tf.concat(2, [lpad, padded]) - elif num_rpad > 0: padded = tf.concat(2, [padded, rpad]) + if num_tpad > 0 and num_bpad > 0: padded = tf.concat(axis=1, values=[tpad, padded, bpad]) + elif num_tpad > 0: padded = tf.concat(axis=1, values=[tpad, padded]) + elif num_bpad > 0: padded = tf.concat(axis=1, values=[padded, bpad]) + if num_lpad > 0 and num_rpad > 0: padded = tf.concat(axis=2, values=[lpad, padded, rpad]) + elif num_lpad > 0: padded = tf.concat(axis=2, values=[lpad, padded]) + elif num_rpad > 0: padded = tf.concat(axis=2, values=[padded, rpad]) return padded -- cgit v1.2.3-70-g09d2