Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
5b430278
提交
5b430278
authored
10月 17, 2014
作者:
Li
提交者:
Frederic
10月 21, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
fa474bd0
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
19 行增加
和
19 行删除
+19
-19
faq.txt
doc/faq.txt
+0
-1
function_module.py
theano/compile/function_module.py
+19
-18
没有找到文件。
doc/faq.txt
浏览文件 @
5b430278
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
==========================
==========================
Frequently Asked Questions
Frequently Asked Questions
==========================
==========================
3B
TypeError: object of type 'TensorVariable' has no len()
TypeError: object of type 'TensorVariable' has no len()
-------------------------------------------------------
-------------------------------------------------------
...
...
theano/compile/function_module.py
浏览文件 @
5b430278
...
@@ -1239,24 +1239,25 @@ class FunctionMaker(object):
...
@@ -1239,24 +1239,25 @@ class FunctionMaker(object):
add_stack_trace_on_call_orig
=
gof
.
Op
.
add_stack_trace_on_call
add_stack_trace_on_call_orig
=
gof
.
Op
.
add_stack_trace_on_call
if
need_opt
:
if
need_opt
:
# optimize the fgraph
try
:
theano
.
config
.
compute_test_value
=
theano
.
config
.
compute_test_value_opt
# optimize the fgraph
gof
.
Op
.
add_stack_trace_on_call
=
False
theano
.
config
.
compute_test_value
=
theano
.
config
.
compute_test_value_opt
start_optimizer
=
time
.
time
()
gof
.
Op
.
add_stack_trace_on_call
=
False
optimizer_profile
=
optimizer
(
fgraph
)
start_optimizer
=
time
.
time
()
end_optimizer
=
time
.
time
()
optimizer_profile
=
optimizer
(
fgraph
)
opt_time
=
end_optimizer
-
start_optimizer
end_optimizer
=
time
.
time
()
if
profile
:
opt_time
=
end_optimizer
-
start_optimizer
profile
.
optimizer_time
+=
opt_time
if
profile
:
if
theano
.
config
.
profile_optimizer
:
profile
.
optimizer_time
+=
opt_time
profile
.
optimizer_profile
=
(
optimizer
,
optimizer_profile
)
if
theano
.
config
.
profile_optimizer
:
_logger
.
debug
(
'Optimizing took
%
f seconds'
,
opt_time
)
profile
.
optimizer_profile
=
(
optimizer
,
optimizer_profile
)
_logger
.
debug
(
'Optimizing took
%
f seconds'
,
opt_time
)
#Add deep copy to respect the memory interface
insert_deepcopy
(
fgraph
,
inputs
,
outputs
+
additional_outputs
)
#Add deep copy to respect the memory interface
# fgraph is already optimized
insert_deepcopy
(
fgraph
,
inputs
,
outputs
+
additional_outputs
)
theano
.
config
.
compute_test_value
=
compute_test_value_orig
finally
:
gof
.
Op
.
add_stack_trace_on_call
=
add_stack_trace_on_call_orig
theano
.
config
.
compute_test_value
=
compute_test_value_orig
gof
.
Op
.
add_stack_trace_on_call
=
add_stack_trace_on_call_orig
# initialize the linker
# initialize the linker
if
not
hasattr
(
linker
,
'accept'
):
if
not
hasattr
(
linker
,
'accept'
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论