Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
b27c59d1
提交
b27c59d1
authored
3月 10, 2025
作者:
Ricardo Vieira
提交者:
Ricardo Vieira
3月 13, 2025
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Simplify `expand_empty`
上级
c70a8869
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
105 行增加
和
110 行删除
+105
-110
utils.py
pytensor/scan/utils.py
+2
-2
test_printing.py
tests/scan/test_printing.py
+103
-108
没有找到文件。
pytensor/scan/utils.py
浏览文件 @
b27c59d1
...
@@ -231,8 +231,8 @@ def expand_empty(tensor_var, size):
...
@@ -231,8 +231,8 @@ def expand_empty(tensor_var, size):
if
size
==
0
:
if
size
==
0
:
return
tensor_var
return
tensor_var
shapes
=
[
tensor_var
.
shape
[
x
]
for
x
in
range
(
tensor_var
.
ndim
)]
shapes
=
tuple
(
tensor_var
.
shape
)
new_shape
=
[
size
+
shapes
[
0
]]
+
shapes
[
1
:]
new_shape
=
(
size
+
shapes
[
0
],
*
shapes
[
1
:])
empty
=
AllocEmpty
(
tensor_var
.
dtype
)(
*
new_shape
)
empty
=
AllocEmpty
(
tensor_var
.
dtype
)(
*
new_shape
)
ret
=
set_subtensor
(
empty
[:
shapes
[
0
]],
tensor_var
)
ret
=
set_subtensor
(
empty
[:
shapes
[
0
]],
tensor_var
)
...
...
tests/scan/test_printing.py
浏览文件 @
b27c59d1
...
@@ -44,25 +44,24 @@ def test_debugprint_sitsot():
...
@@ -44,25 +44,24 @@ def test_debugprint_sitsot():
│ │ │ │ │ │ └─ 1.0 [id O]
│ │ │ │ │ │ └─ 1.0 [id O]
│ │ │ │ │ └─ 0 [id P]
│ │ │ │ │ └─ 0 [id P]
│ │ │ │ └─ Subtensor{i} [id Q]
│ │ │ │ └─ Subtensor{i} [id Q]
│ │ │ │ ├─ Shape [id R]
│ │ │ │ ├─ Shape [id I]
│ │ │ │ │ └─ Unbroadcast{0} [id J]
│ │ │ │ │ └─ ···
│ │ │ │ │ └─ ···
│ │ │ │ └─ 1 [id R]
│ │ │ │ └─ 1 [id S]
│ │ │ ├─ Unbroadcast{0} [id J]
│ │ │ ├─ Unbroadcast{0} [id J]
│ │ │ │ └─ ···
│ │ │ │ └─ ···
│ │ │ └─ ScalarFromTensor [id
T
]
│ │ │ └─ ScalarFromTensor [id
S
]
│ │ │ └─ Subtensor{i} [id H]
│ │ │ └─ Subtensor{i} [id H]
│ │ │ └─ ···
│ │ │ └─ ···
│ │ └─ A [id M] (outer_in_non_seqs-0)
│ │ └─ A [id M] (outer_in_non_seqs-0)
│ └─ 1 [id
U
]
│ └─ 1 [id
T
]
└─ -1 [id
V
]
└─ -1 [id
U
]
Inner graphs:
Inner graphs:
Scan{scan_fn, while_loop=False, inplace=none} [id C]
Scan{scan_fn, while_loop=False, inplace=none} [id C]
← Mul [id
W
] (inner_out_sit_sot-0)
← Mul [id
V
] (inner_out_sit_sot-0)
├─ *0-<Vector(float64, shape=(?,))> [id
X
] -> [id E] (inner_in_sit_sot-0)
├─ *0-<Vector(float64, shape=(?,))> [id
W
] -> [id E] (inner_in_sit_sot-0)
└─ *1-<Vector(float64, shape=(?,))> [id
Y
] -> [id M] (inner_in_non_seqs-0)
└─ *1-<Vector(float64, shape=(?,))> [id
X
] -> [id M] (inner_in_non_seqs-0)
"""
"""
for
truth
,
out
in
zip
(
expected_output
.
split
(
"
\n
"
),
lines
,
strict
=
True
):
for
truth
,
out
in
zip
(
expected_output
.
split
(
"
\n
"
),
lines
,
strict
=
True
):
...
@@ -103,25 +102,24 @@ def test_debugprint_sitsot_no_extra_info():
...
@@ -103,25 +102,24 @@ def test_debugprint_sitsot_no_extra_info():
│ │ │ │ │ │ └─ 1.0 [id O]
│ │ │ │ │ │ └─ 1.0 [id O]
│ │ │ │ │ └─ 0 [id P]
│ │ │ │ │ └─ 0 [id P]
│ │ │ │ └─ Subtensor{i} [id Q]
│ │ │ │ └─ Subtensor{i} [id Q]
│ │ │ │ ├─ Shape [id R]
│ │ │ │ ├─ Shape [id I]
│ │ │ │ │ └─ Unbroadcast{0} [id J]
│ │ │ │ │ └─ ···
│ │ │ │ │ └─ ···
│ │ │ │ └─ 1 [id R]
│ │ │ │ └─ 1 [id S]
│ │ │ ├─ Unbroadcast{0} [id J]
│ │ │ ├─ Unbroadcast{0} [id J]
│ │ │ │ └─ ···
│ │ │ │ └─ ···
│ │ │ └─ ScalarFromTensor [id
T
]
│ │ │ └─ ScalarFromTensor [id
S
]
│ │ │ └─ Subtensor{i} [id H]
│ │ │ └─ Subtensor{i} [id H]
│ │ │ └─ ···
│ │ │ └─ ···
│ │ └─ A [id M]
│ │ └─ A [id M]
│ └─ 1 [id
U
]
│ └─ 1 [id
T
]
└─ -1 [id
V
]
└─ -1 [id
U
]
Inner graphs:
Inner graphs:
Scan{scan_fn, while_loop=False, inplace=none} [id C]
Scan{scan_fn, while_loop=False, inplace=none} [id C]
← Mul [id
W
]
← Mul [id
V
]
├─ *0-<Vector(float64, shape=(?,))> [id
X
] -> [id E]
├─ *0-<Vector(float64, shape=(?,))> [id
W
] -> [id E]
└─ *1-<Vector(float64, shape=(?,))> [id
Y
] -> [id M]
└─ *1-<Vector(float64, shape=(?,))> [id
X
] -> [id M]
"""
"""
for
truth
,
out
in
zip
(
expected_output
.
split
(
"
\n
"
),
lines
,
strict
=
True
):
for
truth
,
out
in
zip
(
expected_output
.
split
(
"
\n
"
),
lines
,
strict
=
True
):
...
@@ -288,25 +286,24 @@ def test_debugprint_nested_scans():
...
@@ -288,25 +286,24 @@ def test_debugprint_nested_scans():
│ │ │ │ │ │ │ └─ 1.0 [id BQ]
│ │ │ │ │ │ │ └─ 1.0 [id BQ]
│ │ │ │ │ │ └─ 0 [id BR]
│ │ │ │ │ │ └─ 0 [id BR]
│ │ │ │ │ └─ Subtensor{i} [id BS]
│ │ │ │ │ └─ Subtensor{i} [id BS]
│ │ │ │ │ ├─ Shape [id BT]
│ │ │ │ │ ├─ Shape [id BK]
│ │ │ │ │ │ └─ Unbroadcast{0} [id BL]
│ │ │ │ │ │ └─ ···
│ │ │ │ │ │ └─ ···
│ │ │ │ │ └─ 1 [id BT]
│ │ │ │ │ └─ 1 [id BU]
│ │ │ │ ├─ Unbroadcast{0} [id BL]
│ │ │ │ ├─ Unbroadcast{0} [id BL]
│ │ │ │ │ └─ ···
│ │ │ │ │ └─ ···
│ │ │ │ └─ ScalarFromTensor [id B
V
]
│ │ │ │ └─ ScalarFromTensor [id B
U
]
│ │ │ │ └─ Subtensor{i} [id BJ]
│ │ │ │ └─ Subtensor{i} [id BJ]
│ │ │ │ └─ ···
│ │ │ │ └─ ···
│ │ │ └─ *2-<Vector(float64, shape=(?,))> [id BO] -> [id W] (inner_in_non_seqs-0) (outer_in_non_seqs-0)
│ │ │ └─ *2-<Vector(float64, shape=(?,))> [id BO] -> [id W] (inner_in_non_seqs-0) (outer_in_non_seqs-0)
│ │ └─ 1 [id B
W
]
│ │ └─ 1 [id B
V
]
│ └─ -1 [id B
X
]
│ └─ -1 [id B
W
]
└─ ExpandDims{axis=0} [id B
Y
]
└─ ExpandDims{axis=0} [id B
X
]
└─ *1-<Scalar(int64, shape=())> [id B
Z
] -> [id U] (inner_in_seqs-1)
└─ *1-<Scalar(int64, shape=())> [id B
Y
] -> [id U] (inner_in_seqs-1)
Scan{scan_fn, while_loop=False, inplace=none} [id BE]
Scan{scan_fn, while_loop=False, inplace=none} [id BE]
← Mul [id
CA
] (inner_out_sit_sot-0)
← Mul [id
BZ
] (inner_out_sit_sot-0)
├─ *0-<Vector(float64, shape=(?,))> [id C
B
] -> [id BG] (inner_in_sit_sot-0)
├─ *0-<Vector(float64, shape=(?,))> [id C
A
] -> [id BG] (inner_in_sit_sot-0)
└─ *1-<Vector(float64, shape=(?,))> [id C
C
] -> [id BO] (inner_in_non_seqs-0)
└─ *1-<Vector(float64, shape=(?,))> [id C
B
] -> [id BO] (inner_in_non_seqs-0)
"""
"""
for
truth
,
out
in
zip
(
expected_output
.
split
(
"
\n
"
),
lines
,
strict
=
True
):
for
truth
,
out
in
zip
(
expected_output
.
split
(
"
\n
"
),
lines
,
strict
=
True
):
...
@@ -386,27 +383,26 @@ def test_debugprint_nested_scans():
...
@@ -386,27 +383,26 @@ def test_debugprint_nested_scans():
│ │ │ │ │ │ │ └─ 1.0 [id BR]
│ │ │ │ │ │ │ └─ 1.0 [id BR]
│ │ │ │ │ │ └─ 0 [id BS]
│ │ │ │ │ │ └─ 0 [id BS]
│ │ │ │ │ └─ Subtensor{i} [id BT]
│ │ │ │ │ └─ Subtensor{i} [id BT]
│ │ │ │ │ ├─ Shape [id BU]
│ │ │ │ │ ├─ Shape [id BM]
│ │ │ │ │ │ └─ Unbroadcast{0} [id BN]
│ │ │ │ │ │ └─ ···
│ │ │ │ │ │ └─ ···
│ │ │ │ │ └─ 1 [id BU]
│ │ │ │ │ └─ 1 [id BV]
│ │ │ │ ├─ Unbroadcast{0} [id BN]
│ │ │ │ ├─ Unbroadcast{0} [id BN]
│ │ │ │ │ └─ ···
│ │ │ │ │ └─ ···
│ │ │ │ └─ ScalarFromTensor [id B
W
]
│ │ │ │ └─ ScalarFromTensor [id B
V
]
│ │ │ │ └─ Subtensor{i} [id BL]
│ │ │ │ └─ Subtensor{i} [id BL]
│ │ │ │ └─ ···
│ │ │ │ └─ ···
│ │ │ └─ *2-<Vector(float64, shape=(?,))> [id BA] (inner_in_non_seqs-0) (outer_in_non_seqs-0)
│ │ │ └─ *2-<Vector(float64, shape=(?,))> [id BA] (inner_in_non_seqs-0) (outer_in_non_seqs-0)
│ │ └─ 1 [id B
X
]
│ │ └─ 1 [id B
W
]
│ └─ -1 [id B
Y
]
│ └─ -1 [id B
X
]
└─ ExpandDims{axis=0} [id B
Z
]
└─ ExpandDims{axis=0} [id B
Y
]
└─ *1-<Scalar(int64, shape=())> [id Z] (inner_in_seqs-1)
└─ *1-<Scalar(int64, shape=())> [id Z] (inner_in_seqs-1)
Scan{scan_fn, while_loop=False, inplace=none} [id BH]
Scan{scan_fn, while_loop=False, inplace=none} [id BH]
→ *0-<Vector(float64, shape=(?,))> [id
CA
] -> [id BI] (inner_in_sit_sot-0)
→ *0-<Vector(float64, shape=(?,))> [id
BZ
] -> [id BI] (inner_in_sit_sot-0)
→ *1-<Vector(float64, shape=(?,))> [id C
B
] -> [id BA] (inner_in_non_seqs-0)
→ *1-<Vector(float64, shape=(?,))> [id C
A
] -> [id BA] (inner_in_non_seqs-0)
← Mul [id C
C
] (inner_out_sit_sot-0)
← Mul [id C
B
] (inner_out_sit_sot-0)
├─ *0-<Vector(float64, shape=(?,))> [id
CA
] (inner_in_sit_sot-0)
├─ *0-<Vector(float64, shape=(?,))> [id
BZ
] (inner_in_sit_sot-0)
└─ *1-<Vector(float64, shape=(?,))> [id C
B
] (inner_in_non_seqs-0)
└─ *1-<Vector(float64, shape=(?,))> [id C
A
] (inner_in_non_seqs-0)
"""
"""
for
truth
,
out
in
zip
(
expected_output
.
split
(
"
\n
"
),
lines
,
strict
=
True
):
for
truth
,
out
in
zip
(
expected_output
.
split
(
"
\n
"
),
lines
,
strict
=
True
):
...
@@ -528,98 +524,97 @@ def test_debugprint_mitmot():
...
@@ -528,98 +524,97 @@ def test_debugprint_mitmot():
│ │ │ │ │ │ │ │ └─ 1.0 [id R]
│ │ │ │ │ │ │ │ └─ 1.0 [id R]
│ │ │ │ │ │ │ └─ 0 [id S]
│ │ │ │ │ │ │ └─ 0 [id S]
│ │ │ │ │ │ └─ Subtensor{i} [id T]
│ │ │ │ │ │ └─ Subtensor{i} [id T]
│ │ │ │ │ │ ├─ Shape [id U]
│ │ │ │ │ │ ├─ Shape [id L]
│ │ │ │ │ │ │ └─ Unbroadcast{0} [id M]
│ │ │ │ │ │ │ └─ ···
│ │ │ │ │ │ │ └─ ···
│ │ │ │ │ │ └─ 1 [id U]
│ │ │ │ │ │ └─ 1 [id V]
│ │ │ │ │ ├─ Unbroadcast{0} [id M]
│ │ │ │ │ ├─ Unbroadcast{0} [id M]
│ │ │ │ │ │ └─ ···
│ │ │ │ │ │ └─ ···
│ │ │ │ │ └─ ScalarFromTensor [id
W
]
│ │ │ │ │ └─ ScalarFromTensor [id
V
]
│ │ │ │ │ └─ Subtensor{i} [id K]
│ │ │ │ │ └─ Subtensor{i} [id K]
│ │ │ │ │ └─ ···
│ │ │ │ │ └─ ···
│ │ │ │ └─ A [id P] (outer_in_non_seqs-0)
│ │ │ │ └─ A [id P] (outer_in_non_seqs-0)
│ │ │ └─ 0 [id
X
]
│ │ │ └─ 0 [id
W
]
│ │ └─ 1 [id
Y
]
│ │ └─ 1 [id
X
]
│ ├─ Subtensor{:stop} [id
Z
] (outer_in_seqs-0)
│ ├─ Subtensor{:stop} [id
Y
] (outer_in_seqs-0)
│ │ ├─ Subtensor{::step} [id
BA
]
│ │ ├─ Subtensor{::step} [id
Z
]
│ │ │ ├─ Subtensor{:stop} [id B
B
]
│ │ │ ├─ Subtensor{:stop} [id B
A
]
│ │ │ │ ├─ Scan{scan_fn, while_loop=False, inplace=none} [id F] (outer_out_sit_sot-0)
│ │ │ │ ├─ Scan{scan_fn, while_loop=False, inplace=none} [id F] (outer_out_sit_sot-0)
│ │ │ │ │ └─ ···
│ │ │ │ │ └─ ···
│ │ │ │ └─ -1 [id B
C
]
│ │ │ │ └─ -1 [id B
B
]
│ │ │ └─ -1 [id B
D
]
│ │ │ └─ -1 [id B
C
]
│ │ └─ ScalarFromTensor [id B
E
]
│ │ └─ ScalarFromTensor [id B
D
]
│ │ └─ Sub [id C]
│ │ └─ Sub [id C]
│ │ └─ ···
│ │ └─ ···
│ ├─ Subtensor{:stop} [id B
F
] (outer_in_seqs-1)
│ ├─ Subtensor{:stop} [id B
E
] (outer_in_seqs-1)
│ │ ├─ Subtensor{:stop} [id B
G
]
│ │ ├─ Subtensor{:stop} [id B
F
]
│ │ │ ├─ Subtensor{::step} [id B
H
]
│ │ │ ├─ Subtensor{::step} [id B
G
]
│ │ │ │ ├─ Scan{scan_fn, while_loop=False, inplace=none} [id F] (outer_out_sit_sot-0)
│ │ │ │ ├─ Scan{scan_fn, while_loop=False, inplace=none} [id F] (outer_out_sit_sot-0)
│ │ │ │ │ └─ ···
│ │ │ │ │ └─ ···
│ │ │ │ └─ -1 [id B
I
]
│ │ │ │ └─ -1 [id B
H
]
│ │ │ └─ -1 [id B
J
]
│ │ │ └─ -1 [id B
I
]
│ │ └─ ScalarFromTensor [id B
K
]
│ │ └─ ScalarFromTensor [id B
J
]
│ │ └─ Sub [id C]
│ │ └─ Sub [id C]
│ │ └─ ···
│ │ └─ ···
│ ├─ Subtensor{::step} [id B
L
] (outer_in_mit_mot-0)
│ ├─ Subtensor{::step} [id B
K
] (outer_in_mit_mot-0)
│ │ ├─ IncSubtensor{start:} [id B
M
]
│ │ ├─ IncSubtensor{start:} [id B
L
]
│ │ │ ├─ Second [id B
N
]
│ │ │ ├─ Second [id B
M
]
│ │ │ │ ├─ Scan{scan_fn, while_loop=False, inplace=none} [id F] (outer_out_sit_sot-0)
│ │ │ │ ├─ Scan{scan_fn, while_loop=False, inplace=none} [id F] (outer_out_sit_sot-0)
│ │ │ │ │ └─ ···
│ │ │ │ │ └─ ···
│ │ │ │ └─ ExpandDims{axes=[0, 1]} [id B
O
]
│ │ │ │ └─ ExpandDims{axes=[0, 1]} [id B
N
]
│ │ │ │ └─ 0.0 [id B
P
]
│ │ │ │ └─ 0.0 [id B
O
]
│ │ │ ├─ IncSubtensor{i} [id B
Q
]
│ │ │ ├─ IncSubtensor{i} [id B
P
]
│ │ │ │ ├─ Second [id B
R
]
│ │ │ │ ├─ Second [id B
Q
]
│ │ │ │ │ ├─ Subtensor{start:} [id B
S
]
│ │ │ │ │ ├─ Subtensor{start:} [id B
R
]
│ │ │ │ │ │ ├─ Scan{scan_fn, while_loop=False, inplace=none} [id F] (outer_out_sit_sot-0)
│ │ │ │ │ │ ├─ Scan{scan_fn, while_loop=False, inplace=none} [id F] (outer_out_sit_sot-0)
│ │ │ │ │ │ │ └─ ···
│ │ │ │ │ │ │ └─ ···
│ │ │ │ │ │ └─ 1 [id B
T
]
│ │ │ │ │ │ └─ 1 [id B
S
]
│ │ │ │ │ └─ ExpandDims{axes=[0, 1]} [id B
U
]
│ │ │ │ │ └─ ExpandDims{axes=[0, 1]} [id B
T
]
│ │ │ │ │ └─ 0.0 [id B
V
]
│ │ │ │ │ └─ 0.0 [id B
U
]
│ │ │ │ ├─ Second [id B
W
]
│ │ │ │ ├─ Second [id B
V
]
│ │ │ │ │ ├─ Subtensor{i} [id B
X
]
│ │ │ │ │ ├─ Subtensor{i} [id B
W
]
│ │ │ │ │ │ ├─ Subtensor{start:} [id B
S
]
│ │ │ │ │ │ ├─ Subtensor{start:} [id B
R
]
│ │ │ │ │ │ │ └─ ···
│ │ │ │ │ │ │ └─ ···
│ │ │ │ │ │ └─ -1 [id B
Y
]
│ │ │ │ │ │ └─ -1 [id B
X
]
│ │ │ │ │ └─ ExpandDims{axis=0} [id B
Z
]
│ │ │ │ │ └─ ExpandDims{axis=0} [id B
Y
]
│ │ │ │ │ └─ Second [id
CA
]
│ │ │ │ │ └─ Second [id
BZ
]
│ │ │ │ │ ├─ Sum{axes=None} [id C
B
]
│ │ │ │ │ ├─ Sum{axes=None} [id C
A
]
│ │ │ │ │ │ └─ Subtensor{i} [id B
X
]
│ │ │ │ │ │ └─ Subtensor{i} [id B
W
]
│ │ │ │ │ │ └─ ···
│ │ │ │ │ │ └─ ···
│ │ │ │ │ └─ 1.0 [id C
C
]
│ │ │ │ │ └─ 1.0 [id C
B
]
│ │ │ │ └─ -1 [id B
Y
]
│ │ │ │ └─ -1 [id B
X
]
│ │ │ └─ 1 [id B
T
]
│ │ │ └─ 1 [id B
S
]
│ │ └─ -1 [id C
D
]
│ │ └─ -1 [id C
C
]
│ ├─ Alloc [id C
E
] (outer_in_sit_sot-0)
│ ├─ Alloc [id C
D
] (outer_in_sit_sot-0)
│ │ ├─ 0.0 [id C
F
]
│ │ ├─ 0.0 [id C
E
]
│ │ ├─ Add [id C
G
]
│ │ ├─ Add [id C
F
]
│ │ │ ├─ Sub [id C]
│ │ │ ├─ Sub [id C]
│ │ │ │ └─ ···
│ │ │ │ └─ ···
│ │ │ └─ 1 [id C
H
]
│ │ │ └─ 1 [id C
G
]
│ │ └─ Subtensor{i} [id C
I
]
│ │ └─ Subtensor{i} [id C
H
]
│ │ ├─ Shape [id C
J
]
│ │ ├─ Shape [id C
I
]
│ │ │ └─ A [id P]
│ │ │ └─ A [id P]
│ │ └─ 0 [id C
K
]
│ │ └─ 0 [id C
J
]
│ └─ A [id P] (outer_in_non_seqs-0)
│ └─ A [id P] (outer_in_non_seqs-0)
└─ -1 [id C
L
]
└─ -1 [id C
K
]
Inner graphs:
Inner graphs:
Scan{grad_of_scan_fn, while_loop=False, inplace=none} [id B]
Scan{grad_of_scan_fn, while_loop=False, inplace=none} [id B]
← Add [id C
M
] (inner_out_mit_mot-0-0)
← Add [id C
L
] (inner_out_mit_mot-0-0)
├─ Mul [id C
N
]
├─ Mul [id C
M
]
│ ├─ *2-<Vector(float64, shape=(?,))> [id C
O] -> [id BL
] (inner_in_mit_mot-0-0)
│ ├─ *2-<Vector(float64, shape=(?,))> [id C
N] -> [id BK
] (inner_in_mit_mot-0-0)
│ └─ *5-<Vector(float64, shape=(?,))> [id C
P
] -> [id P] (inner_in_non_seqs-0)
│ └─ *5-<Vector(float64, shape=(?,))> [id C
O
] -> [id P] (inner_in_non_seqs-0)
└─ *3-<Vector(float64, shape=(?,))> [id C
Q] -> [id BL
] (inner_in_mit_mot-0-1)
└─ *3-<Vector(float64, shape=(?,))> [id C
P] -> [id BK
] (inner_in_mit_mot-0-1)
← Add [id C
R
] (inner_out_sit_sot-0)
← Add [id C
Q
] (inner_out_sit_sot-0)
├─ Mul [id C
S
]
├─ Mul [id C
R
]
│ ├─ *2-<Vector(float64, shape=(?,))> [id C
O] -> [id BL
] (inner_in_mit_mot-0-0)
│ ├─ *2-<Vector(float64, shape=(?,))> [id C
N] -> [id BK
] (inner_in_mit_mot-0-0)
│ └─ *0-<Vector(float64, shape=(?,))> [id C
T] -> [id Z
] (inner_in_seqs-0)
│ └─ *0-<Vector(float64, shape=(?,))> [id C
S] -> [id Y
] (inner_in_seqs-0)
└─ *4-<Vector(float64, shape=(?,))> [id C
U] -> [id CE
] (inner_in_sit_sot-0)
└─ *4-<Vector(float64, shape=(?,))> [id C
T] -> [id CD
] (inner_in_sit_sot-0)
Scan{scan_fn, while_loop=False, inplace=none} [id F]
Scan{scan_fn, while_loop=False, inplace=none} [id F]
← Mul [id C
V
] (inner_out_sit_sot-0)
← Mul [id C
U
] (inner_out_sit_sot-0)
├─ *0-<Vector(float64, shape=(?,))> [id C
T
] -> [id H] (inner_in_sit_sot-0)
├─ *0-<Vector(float64, shape=(?,))> [id C
S
] -> [id H] (inner_in_sit_sot-0)
└─ *1-<Vector(float64, shape=(?,))> [id C
W
] -> [id P] (inner_in_non_seqs-0)
└─ *1-<Vector(float64, shape=(?,))> [id C
V
] -> [id P] (inner_in_non_seqs-0)
"""
"""
for
truth
,
out
in
zip
(
expected_output
.
split
(
"
\n
"
),
lines
,
strict
=
True
):
for
truth
,
out
in
zip
(
expected_output
.
split
(
"
\n
"
),
lines
,
strict
=
True
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论