Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9fc1f281
提交
9fc1f281
authored
3月 25, 2015
作者:
AlexLamb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added documentation on output_keys argument. Switched str to basestring
上级
d50d1e2c
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
13 行增加
和
3 行删除
+13
-3
debugmode.py
theano/compile/debugmode.py
+4
-0
function.py
theano/compile/function.py
+3
-2
function_module.py
theano/compile/function_module.py
+5
-0
pfunc.py
theano/compile/pfunc.py
+1
-1
没有找到文件。
theano/compile/debugmode.py
浏览文件 @
9fc1f281
...
@@ -2196,6 +2196,10 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
...
@@ -2196,6 +2196,10 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
:param on_unused_input: What to do if a variable in the 'inputs' list is
:param on_unused_input: What to do if a variable in the 'inputs' list is
not used in the graph. Possible values are 'raise', 'warn', and 'ignore'.
not used in the graph. Possible values are 'raise', 'warn', and 'ignore'.
:param output_keys: If the outputs argument for theano.function was a
list, then output_keys is None. If the outputs argument was a dict,
then output_keys is a sorted list of the keys from that dict.
:note: this function sets TensorType.filter_checks_isfinite
:note: this function sets TensorType.filter_checks_isfinite
when `mode.check_isfinite` is True
when `mode.check_isfinite` is True
...
...
theano/compile/function.py
浏览文件 @
9fc1f281
...
@@ -49,7 +49,8 @@ def function(inputs, outputs=None, mode=None, updates=None, givens=None,
...
@@ -49,7 +49,8 @@ def function(inputs, outputs=None, mode=None, updates=None, givens=None,
:param inputs: function parameters, these are not allowed to be shared
:param inputs: function parameters, these are not allowed to be shared
variables
variables
:type outputs: list of Variables or Out instances
:type outputs: list or dict of Variables or Out instances. If it is a
dict, the keys must be strings
:param outputs: expressions to compute
:param outputs: expressions to compute
:type mode: string or `Mode` instance.
:type mode: string or `Mode` instance.
...
@@ -193,7 +194,7 @@ def function(inputs, outputs=None, mode=None, updates=None, givens=None,
...
@@ -193,7 +194,7 @@ def function(inputs, outputs=None, mode=None, updates=None, givens=None,
output_keys
=
[]
output_keys
=
[]
outputs
=
[]
outputs
=
[]
for
pair
in
output_items_sorted
:
for
pair
in
output_items_sorted
:
assert
isinstance
(
pair
[
0
],
str
)
assert
isinstance
(
pair
[
0
],
basestring
)
output_keys
.
append
(
pair
[
0
])
output_keys
.
append
(
pair
[
0
])
outputs
.
append
(
pair
[
1
])
outputs
.
append
(
pair
[
1
])
...
...
theano/compile/function_module.py
浏览文件 @
9fc1f281
...
@@ -1442,6 +1442,11 @@ def orig_function(inputs, outputs, mode=None, accept_inplace=False,
...
@@ -1442,6 +1442,11 @@ def orig_function(inputs, outputs, mode=None, accept_inplace=False,
:param on_unused_input: What to do if a variable in the 'inputs' list is
:param on_unused_input: What to do if a variable in the 'inputs' list is
not used in the graph. Possible values are 'raise', 'warn', 'ignore'
not used in the graph. Possible values are 'raise', 'warn', 'ignore'
and None
and None
:param output_keys: If the outputs were provided to theano.function as a
list, then output_keys is None. Otherwise, if outputs were provided
as a dict, output_keys is the sorted list of keys from the outputs
"""
"""
# Every element of the input list will be upgraded to an `In` instance if
# Every element of the input list will be upgraded to an `In` instance if
...
...
theano/compile/pfunc.py
浏览文件 @
9fc1f281
...
@@ -506,7 +506,7 @@ def pfunc(params, outputs=None, mode=None, updates=None, givens=None,
...
@@ -506,7 +506,7 @@ def pfunc(params, outputs=None, mode=None, updates=None, givens=None,
mutable
=
False
,
borrow
=
True
,
shared
=
True
)
mutable
=
False
,
borrow
=
True
,
shared
=
True
)
inputs
.
append
(
si
)
inputs
.
append
(
si
)
return
orig_function
(
inputs
,
cloned_outputs
,
mode
,
return
orig_function
(
inputs
,
cloned_outputs
,
mode
,
accept_inplace
=
accept_inplace
,
name
=
name
,
profile
=
profile
,
accept_inplace
=
accept_inplace
,
name
=
name
,
profile
=
profile
,
on_unused_input
=
on_unused_input
,
output_keys
=
output_keys
)
on_unused_input
=
on_unused_input
,
output_keys
=
output_keys
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论