Skip to content

Commit 69e44fc

Browse files
committed
[Test] testcase for ratio=0 Dropout test_remove_identity_ops
1 parent b176362 commit 69e44fc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/transformation/test_remove_identity_ops.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ def insert_identity_op(model, op, as_first_node, approx):
5858
elif op == "Pad":
5959
# opset 11 and above: padding specified as input and not attribute
6060
val = np.asarray([0] * 2 * inp_ndims, dtype=np.int64)
61+
elif op == "Dropout":
62+
val = None
63+
kwargs = {"ratio": 0.0}
6164
else:
6265
return
6366

@@ -79,7 +82,7 @@ def insert_identity_op(model, op, as_first_node, approx):
7982

8083

8184
# identity operations to be inserted
82-
@pytest.mark.parametrize("op", ["Add", "Sub", "Mul", "Div", "Identity", "Pad"])
85+
@pytest.mark.parametrize("op", ["Add", "Sub", "Mul", "Div", "Identity", "Pad", "Dropout"])
8386
@pytest.mark.parametrize("approx", [False, True])
8487
@pytest.mark.parametrize("as_first_node", [False, True])
8588
@pytest.mark.parametrize("fork_before_id", [False, True])

0 commit comments

Comments
 (0)