Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
a31fc8e7
提交
a31fc8e7
authored
11月 14, 2015
作者:
Iulian Vlad Serban
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed flake8 errors.
上级
8d6ff922
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
8 行删除
+8
-8
opt.py
theano/tensor/opt.py
+8
-8
没有找到文件。
theano/tensor/opt.py
浏览文件 @
a31fc8e7
...
@@ -3411,7 +3411,7 @@ def local_rebroadcast_lift(node):
...
@@ -3411,7 +3411,7 @@ def local_rebroadcast_lift(node):
# and input (after elemwise operation) to new output, because an
# and input (after elemwise operation) to new output, because an
# error in the new graph could have been caused by either of the
# error in the new graph could have been caused by either of the
# two ops.
# two ops.
copy_stack_trace
(
node
.
outputs
+
node
.
inputs
,
rval
)
copy_stack_trace
(
node
.
outputs
+
node
.
inputs
,
rval
)
return
rval
return
rval
if
inode
and
isinstance
(
inode
.
op
,
T
.
Rebroadcast
):
if
inode
and
isinstance
(
inode
.
op
,
T
.
Rebroadcast
):
...
@@ -3427,7 +3427,7 @@ def local_rebroadcast_lift(node):
...
@@ -3427,7 +3427,7 @@ def local_rebroadcast_lift(node):
# and from previous input (after first rebroadcast op) because an error in
# and from previous input (after first rebroadcast op) because an error in
# the new graph could have been caused by either of the two
# the new graph could have been caused by either of the two
# rebroadcast ops.
# rebroadcast ops.
copy_stack_trace
(
node
.
outputs
+
node
.
inputs
,
rval
)
copy_stack_trace
(
node
.
outputs
+
node
.
inputs
,
rval
)
return
rval
return
rval
...
@@ -3633,7 +3633,7 @@ def local_useless_switch(node):
...
@@ -3633,7 +3633,7 @@ def local_useless_switch(node):
ret
=
T
.
fill
(
cond
,
node
.
inputs
[
1
])
ret
=
T
.
fill
(
cond
,
node
.
inputs
[
1
])
# Copy over stacktrace from switch output and correct branch
# Copy over stacktrace from switch output and correct branch
copy_stack_trace
(
node
.
outputs
+
node
.
inputs
[
1
],
ret
)
copy_stack_trace
(
node
.
outputs
+
node
.
inputs
[
1
],
ret
)
return
[
ret
]
return
[
ret
]
# This case happens with scan.
# This case happens with scan.
...
@@ -3709,7 +3709,7 @@ def local_mul_switch_sink(node):
...
@@ -3709,7 +3709,7 @@ def local_mul_switch_sink(node):
# elementwise multiplication op and previous switch op,
# elementwise multiplication op and previous switch op,
# because an error in this part can be caused by either
# because an error in this part can be caused by either
# of the two previous ops.
# of the two previous ops.
copy_stack_trace
(
node
.
outputs
+
switch
.
outputs
,
fct
)
copy_stack_trace
(
node
.
outputs
+
switch
.
outputs
,
fct
)
return
fct
return
fct
except
NotScalarConstantError
:
except
NotScalarConstantError
:
pass
pass
...
@@ -3733,7 +3733,7 @@ def local_mul_switch_sink(node):
...
@@ -3733,7 +3733,7 @@ def local_mul_switch_sink(node):
# elementwise multiplication op and previous switch op,
# elementwise multiplication op and previous switch op,
# because an error in this part can be caused by either
# because an error in this part can be caused by either
# of the two previous ops.
# of the two previous ops.
copy_stack_trace
(
node
.
outputs
+
switch
.
outputs
,
fct
)
copy_stack_trace
(
node
.
outputs
+
switch
.
outputs
,
fct
)
return
fct
return
fct
except
NotScalarConstantError
:
except
NotScalarConstantError
:
pass
pass
...
@@ -3777,7 +3777,7 @@ def local_div_switch_sink(node):
...
@@ -3777,7 +3777,7 @@ def local_div_switch_sink(node):
# elementwise division op and previous switch op,
# elementwise division op and previous switch op,
# because an error in this part can be caused by either
# because an error in this part can be caused by either
# of the two previous ops.
# of the two previous ops.
copy_stack_trace
(
node
.
outputs
+
switch
.
outputs
,
fct
)
copy_stack_trace
(
node
.
outputs
+
switch
.
outputs
,
fct
)
return
fct
return
fct
except
NotScalarConstantError
:
except
NotScalarConstantError
:
pass
pass
...
@@ -3799,7 +3799,7 @@ def local_div_switch_sink(node):
...
@@ -3799,7 +3799,7 @@ def local_div_switch_sink(node):
# elementwise division op and previous switch op,
# elementwise division op and previous switch op,
# because an error in this part can be caused by either
# because an error in this part can be caused by either
# of the two previous ops.
# of the two previous ops.
copy_stack_trace
(
node
.
outputs
+
switch
.
outputs
,
fct
)
copy_stack_trace
(
node
.
outputs
+
switch
.
outputs
,
fct
)
return
fct
return
fct
except
NotScalarConstantError
:
except
NotScalarConstantError
:
pass
pass
...
@@ -3843,7 +3843,7 @@ def local_useless_tile(node):
...
@@ -3843,7 +3843,7 @@ def local_useless_tile(node):
ret
=
node
.
inputs
[
0
]
.
dimshuffle
(
broad
)
ret
=
node
.
inputs
[
0
]
.
dimshuffle
(
broad
)
# Copy over stacktrace from previous output node,
# Copy over stacktrace from previous output node,
# and from node before tiling operation.
# and from node before tiling operation.
copy_stack_trace
(
node
.
outputs
+
node
.
inputs
[
0
],
ret
)
copy_stack_trace
(
node
.
outputs
+
node
.
inputs
[
0
],
ret
)
return
[
ret
]
return
[
ret
]
except
ValueError
:
except
ValueError
:
return
return
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论