mirror of
https://github.com/wassname/keras-contrib.git
synced 2026-06-27 16:10:11 +08:00
image_segmentation.py pep8
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user