Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
113c22ef
提交
113c22ef
authored
10月 20, 2009
作者:
James Bergstra
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Put function documentation of theano.function() up to date.
上级
8e25c2f3
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
25 行删除
+8
-25
function_module.py
theano/compile/function_module.py
+8
-25
没有找到文件。
theano/compile/function_module.py
浏览文件 @
113c22ef
...
@@ -832,7 +832,7 @@ def register_checker(checker):
...
@@ -832,7 +832,7 @@ def register_checker(checker):
def
function
(
inputs
,
outputs
,
mode
=
None
,
accept_inplace
=
False
):
def
function
(
inputs
,
outputs
,
mode
=
None
,
accept_inplace
=
False
):
"""
"""
Return a
function calculating
the outputs from the inputs.
Return a
Function that will calculate
the outputs from the inputs.
:param inputs: list of `SymbolicInput` or `In` instances
:param inputs: list of `SymbolicInput` or `In` instances
...
@@ -845,42 +845,25 @@ def function(inputs, outputs, mode=None, accept_inplace = False):
...
@@ -845,42 +845,25 @@ def function(inputs, outputs, mode=None, accept_inplace = False):
Currently, the library provides the following mode strings:
Currently, the library provides the following mode strings:
- SANITY_CHECK TODO: NotImplemented
- FAST_COMPILE (apply only optimization that are fast to apply)
- FAST_RUN (default) (optimize without too much time)
- FAST_RUN (default) (optimize without too much time)
-
EXPENSIVE_OPTIMIZATION TODO: NotImplemented
-
FAST_COMPILE (minimal optimization)
- PROFILE_MODE : allow to print a profile mode with mode.print_summary
- PROFILE_MODE : allow to print a profile mode with mode.print_summary
- DEBUG_MODE :
make all the check that we taught of(compare python and c,...
)
- DEBUG_MODE :
verify many internal conditions that are normally assumed (SLOW
)
:param accept_inplace: True iff the graph can contain inplace operations prior to the
:param accept_inplace: True iff the graph can contain inplace operations prior to the
optimization phase (default is False)
optimization phase (default is False)
Every element of the input list will be upgraded to an `In` instance if necessary,
"""
using the rules implemented by the `convert_function_input` function.
Similarly, every element of the output list will be upgraded to an
`Out` instance if necessary:
* a `Variable` instance r will be upgraded like `Out`(r)
Random Numbers
--------------
If your computation involves random numbers, then you have to pass the `RandomKit` as an
input argument. That RandomKit must have a name to be able to seed the generator. To seed
the generator, use the `__setitem__` method:
..code-block: python
#Every element of the input list will be upgraded to an `In` instance if necessary,
#using the rules implemented by the `convert_function_input` function.
f[<kitname>] = seed #re-seed the elements of a RandomKit
#Similarly, every element of the output list will be upgraded to an
#`Out` instance if necessary:
"""
t1
=
time
.
time
()
t1
=
time
.
time
()
if
mode
is
None
:
if
mode
is
None
:
mode
=
mode_module
.
default_mode
mode
=
mode_module
.
default_mode
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论