Skip to content

Commit e332323

Browse files
committed
Add unit test for mul with 1D tensor
1 parent 04220ba commit e332323

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_optimizers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ def test_trans_can_be_replaced_with_reshape2(self):
691691
model_proto, remaining_transpose_num=0)
692692

693693
def test_two_transposes_switch_with_mul(self):
694-
const_node = self._make_onnx_const(np.array(10, dtype=np.float32), "const_10")
694+
const_node = self._make_onnx_const(np.array(np.random.random(6), dtype=np.float32), "const_10")
695695
node0 = helper.make_node("Transpose", ["u1"], ["v1"], perm=[0, 2, 3, 1], name="trans_0")
696696
node1 = helper.make_node("Transpose", ["u2"], ["v2"], perm=[0, 2, 3, 1], name="trans_1")
697697

0 commit comments

Comments
 (0)