image_segmentation.py pep8

This commit is contained in:
Andrew Hundt
2017-12-19 15:53:48 -05:00
parent 3508fdd714
commit d54f71a7d2
@@ -37,11 +37,11 @@ def pair_center_crop(x, y, center_crop_size, data_format, **kwargs):
h_start, h_end = centerh - lh, centerh + rh
w_start, w_end = centerw - lw, centerw + rw
if data_format == 'channels_first':
return x[:, h_start:h_end, w_start:w_end], \
y[:, h_start:h_end, w_start:w_end]
return (x[:, h_start:h_end, w_start:w_end],
y[:, h_start:h_end, w_start:w_end])
elif data_format == 'channels_last':
return x[h_start:h_end, w_start:w_end, :], \
y[h_start:h_end, w_start:w_end, :]
return (x[h_start:h_end, w_start:w_end, :],
y[h_start:h_end, w_start:w_end, :])
def random_crop(x, random_crop_size, data_format, sync_seed=None, **kwargs):