Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 67eb1c2

Browse filesBrowse files
committed
fix ut
1 parent da08d73 commit 67eb1c2
Copy full SHA for 67eb1c2

File tree

1 file changed

+9
-9
lines changed
Filter options

1 file changed

+9
-9
lines changed

‎_unittests/ut_translate_api/test_translate_builder.py

Copy file name to clipboardExpand all lines: _unittests/ut_translate_api/test_translate_builder.py
+9-9Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def light_api(
3737
op: "GraphBuilder",
3838
X: "FLOAT[]",
3939
):
40-
Y = op.Exp(X)
40+
Y = op.Exp(X, outputs=['Y'])
4141
op.Identity(Y, outputs=["Y"])
4242
return Y
4343
@@ -57,7 +57,7 @@ def light_api(
5757
op: "GraphBuilder",
5858
X: "FLOAT[]", # noqa: F722
5959
):
60-
Y = op.Exp(X)
60+
Y = op.Exp(X, outputs=["Y"])
6161
op.Identity(Y, outputs=["Y"])
6262
return Y
6363

@@ -93,8 +93,8 @@ def light_api(
9393
X: "FLOAT[]",
9494
):
9595
r = np.array([-1, 1], dtype=np.int64)
96-
r0_0 = op.Reshape(X, r)
97-
Y = op.Transpose(r0_0, perm=[1, 0])
96+
r0_0 = op.Reshape(X, r, outputs=['r0_0'])
97+
Y = op.Transpose(r0_0, perm=[1, 0], outputs=['Y'])
9898
op.Identity(Y, outputs=["Y"])
9999
return Y
100100
@@ -148,7 +148,7 @@ def light_api(
148148
op: "GraphBuilder",
149149
X: "FLOAT[]",
150150
):
151-
Y = op.Exp(X)
151+
Y = op.Exp(X, outputs=['Y'])
152152
op.Identity(Y, outputs=["Y"])
153153
return Y
154154
@@ -240,8 +240,8 @@ def example(
240240
A: "FLOAT[, ]",
241241
B: "FLOAT[, ]",
242242
):
243-
Y1 = op.LinearRegression(X, A, B, domain='custom')
244-
Y = op.Abs(Y1)
243+
Y1 = op.LinearRegression(X, A, B, domain='custom', outputs=['Y1'])
244+
Y = op.Abs(Y1, outputs=['Y'])
245245
op.Identity(Y, outputs=["Y"])
246246
return Y
247247
@@ -252,8 +252,8 @@ def make_custom_LinearRegression(g: "GraphBuilder"):
252252
a = gr.make_tensor_input('a')
253253
b = gr.make_tensor_input('b')
254254
op = gr.op
255-
xa = op.MatMul(x, a)
256-
y = op.Add(xa, b)
255+
xa = op.MatMul(x, a, outputs=['xa'])
256+
y = op.Add(xa, b, outputs=['y'])
257257
gr.make_tensor_output(y)
258258
g.add_function(builder=gr)
259259
return gr

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.