Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jezsadler committed Jan 8, 2024
1 parent 8be2198 commit 66d28cd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/omlt/neuralnet/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def __init__(
kernel.shape[0],
kernel.shape[1],
kernel.shape[2] + self.dilations[1] - 1,
kernel.shape[3] + self.dilations[1] - 1
kernel.shape[3] + self.dilations[1] - 1,
)
self.__dilated_kernel = dilate_kernel
else:
Expand Down
20 changes: 10 additions & 10 deletions tests/io/test_onnx_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ def test_conv_dilations(datadir):
net = load_onnx_neural_network(model)
layers = list(net.layers)
assert layers[1].dilations == [2, 2]
assert (layers[1].dilated_kernel[0][0].round(8) == array(
[[-0.00886667, 0, 0.18750042],
[0, 0, 0],
[-0.11404419, 0, -0.02588665]]
)).all()
assert (layers[1].dilated_kernel[1][0].round(8) == array(
[[-0.07554907, 0, -0.05939162],
[0, 0, 0],
[0.2217437, 0, 0.14637864]]
)).all()
assert (
layers[1].dilated_kernel[0][0].round(8)
== array(
[[-0.00886667, 0, 0.18750042], [0, 0, 0], [-0.11404419, 0, -0.02588665]]
)
).all()
assert (
layers[1].dilated_kernel[1][0].round(8)
== array([[-0.07554907, 0, -0.05939162], [0, 0, 0], [0.2217437, 0, 0.14637864]])
).all()
assert layers[1].pads == [1, 2, 1, 0]


Expand Down

0 comments on commit 66d28cd

Please sign in to comment.