Skip to content

Commit

Permalink
Hopefully final linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jezsadler committed Nov 6, 2023
1 parent fcc1076 commit 7d660c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/omlt/neuralnet/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def __init__(
activation=activation,
input_index_mapper=input_index_mapper,
)
if pool_func_name not in PoolingLayer2D._POOL_FUNCTIONS:
if pool_func_name not in PoolingLayer2D._POOL_FUNCTIONS:
raise ValueError(
f"Allowable pool functions are {PoolingLayer2D._POOL_FUNCTIONS}, {pool_func_name} was provided."
)
Expand Down
8 changes: 4 additions & 4 deletions tests/io/test_onnx_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ def test_consume_dense_wrong_dims(datadir):
parser = NetworkParser()
parser.parse_network(model.graph, None, None)

parser._nodes["StatefulPartitionedCall/keras_linear_131/dense/MatMul"][1].input.append("abcd")
parser._nodes["StatefulPartitionedCall/keras_linear_131/dense/MatMul"][
1
].input.append("abcd")
with pytest.raises(ValueError) as excinfo:
parser._consume_dense_nodes(
parser._nodes["StatefulPartitionedCall/keras_linear_131/dense/MatMul"][1],
Expand Down Expand Up @@ -254,8 +256,6 @@ def test_consume_maxpool_wrong_dims(datadir):
parser.parse_network(model.graph, None, None)
parser._nodes["node1"][1].input.append("abcd")
with pytest.raises(ValueError) as excinfo:
parser._consume_pool_nodes(
parser._nodes["node1"][1], parser._nodes["node1"][2]
)
parser._consume_pool_nodes(parser._nodes["node1"][1], parser._nodes["node1"][2])
expected_msg_maxpool = """node1 input has 2 dimensions, only nodes with 1 input dimension can be used as starting points for consumption."""
assert str(excinfo.value) == expected_msg_maxpool

0 comments on commit 7d660c4

Please sign in to comment.