Skip to content

Commit cf62088

Browse files
Erman OkmanErman Okman
Erman Okman
authored and
Erman Okman
committed
simplification of the condition for 1d pooling
1 parent 8329127 commit cf62088

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

izer/izer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def main():
503503
f'sum of all pixels ({pixels}) in the layer\'s `in_sequences`.')
504504
input_dim[ll] = conf_input_dim[ll]
505505

506-
if not (operator[ll] == op.CONV1D or (operator[ll] == op.NONE and input_dim[ll][1] == 1)):
506+
if operator[ll] != op.CONV1D and (operator[ll] != op.NONE or input_dim[ll][1] != 1):
507507
if pool_stride[ll][0] != pool_stride[ll][1]:
508508
eprint(f'{layer_pfx(ll)}{op.string(operator[ll])} does not support '
509509
f'non-square pooling stride (currently set to '
@@ -523,7 +523,7 @@ def main():
523523
eprint(f'{layer_pfx(ll)}Pooling or zero-padding results in a zero data '
524524
f'dimension (input {input_dim[ll]}, result {pooled_dim[ll]}).')
525525

526-
if not (operator[ll] == op.CONV1D or (operator[ll] == op.NONE and input_dim[ll][1] == 1)):
526+
if operator[ll] != op.CONV1D and (operator[ll] != op.NONE or input_dim[ll][1] != 1):
527527
if stride[ll][0] != stride[ll][1]:
528528
eprint(f'{layer_pfx(ll)}{op.string(operator[ll])} does not support '
529529
f'non-square stride (currently set to {stride[ll][0]}x{stride[ll][1]}).')

0 commit comments

Comments
 (0)