From 4a83a22586292aae15b0df554993dd367363c451 Mon Sep 17 00:00:00 2001 From: Jeremy Sadler <53983960+jezsadler@users.noreply.github.com> Date: Fri, 17 Nov 2023 01:26:29 +0000 Subject: [PATCH] Linting for dilations pt 1 --- src/omlt/neuralnet/layer.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/omlt/neuralnet/layer.py b/src/omlt/neuralnet/layer.py index 9cd0a039..8deaa1d3 100644 --- a/src/omlt/neuralnet/layer.py +++ b/src/omlt/neuralnet/layer.py @@ -508,7 +508,7 @@ def __init__( kernel.shape[0], kernel.shape[1], 1, - kernel.shape[3] + kernel.shape[3], ) ), np.zeros( @@ -516,9 +516,9 @@ def __init__( kernel.shape[0], kernel.shape[1], self.dilations[0] - 1, - kernel.shape[3] + kernel.shape[3], ) - ) + ), ] ) for i in range(kernel.shape[2] - 1) @@ -540,7 +540,7 @@ def __init__( dilate_rows.shape[0], dilate_rows.shape[1], dilate_rows.shape[2], - 1 + 1, ) ), np.zeros( @@ -548,16 +548,21 @@ def __init__( dilate_rows.shape[0], dilate_rows.shape[1], dilate_rows.shape[2], - self.dilations[1] - 1 + self.dilations[1] - 1, ) - ) + ), ] ) - for i in range(dilate_rows.shape[3]-1) + for i in range(dilate_rows.shape[3] - 1) ] ), dilate_rows[:, :, :, -1].reshape( - (dilate_rows.shape[0], dilate_rows.shape[1], dilate_rows.shape[2], 1) + ( + dilate_rows.shape[0], + dilate_rows.shape[1], + dilate_rows.shape[2], + 1, + ) ), ] )