Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
cfecf720
提交
cfecf720
authored
1月 21, 2010
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prepare for default updates of shared variable. Keyword "no_default_updates" in…
Prepare for default updates of shared variable. Keyword "no_default_updates" in theano.function added.
上级
1997674d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
14 行增加
和
2 行删除
+14
-2
function.py
theano/compile/function.py
+9
-2
pfunc.py
theano/compile/pfunc.py
+0
-0
sharedvalue.py
theano/compile/sharedvalue.py
+5
-0
没有找到文件。
theano/compile/function.py
浏览文件 @
cfecf720
...
@@ -10,7 +10,8 @@ from function_module import orig_function
...
@@ -10,7 +10,8 @@ from function_module import orig_function
from
pfunc
import
pfunc
from
pfunc
import
pfunc
from
numpy
import
any
#for to work in python 2.4
from
numpy
import
any
#for to work in python 2.4
def
function
(
inputs
,
outputs
=
None
,
mode
=
None
,
updates
=
[],
givens
=
[],
accept_inplace
=
False
,
name
=
None
):
def
function
(
inputs
,
outputs
=
None
,
mode
=
None
,
updates
=
[],
givens
=
[],
no_default_updates
=
False
,
accept_inplace
=
False
,
name
=
None
):
"""
"""
Return a callable object that will calculate `outputs` from `inputs`.
Return a callable object that will calculate `outputs` from `inputs`.
...
@@ -31,7 +32,12 @@ def function(inputs, outputs=None, mode=None, updates=[], givens=[], accept_inpl
...
@@ -31,7 +32,12 @@ def function(inputs, outputs=None, mode=None, updates=[], givens=[], accept_inpl
and Var2 in each pair must have the same Type.
and Var2 in each pair must have the same Type.
:param givens: specific substitutions to make in the computation graph (Var2 replaces
:param givens: specific substitutions to make in the computation graph (Var2 replaces
Var1).
Var1).
:type no_default_updates: either bool or list of Variables
:param no_default_updates: if True, do not perform any automatic update on Variables.
If False (default), perform them all. Else, perform automatic updates on all Variables
that are neither in "updates" nor in "no_default_updates".
:param name: an optional name for this function. The profile mode will print the time spent in this function.
:param name: an optional name for this function. The profile mode will print the time spent in this function.
...
@@ -65,4 +71,5 @@ def function(inputs, outputs=None, mode=None, updates=[], givens=[], accept_inpl
...
@@ -65,4 +71,5 @@ def function(inputs, outputs=None, mode=None, updates=[], givens=[], accept_inpl
mode
=
mode
,
mode
=
mode
,
updates
=
updates
,
updates
=
updates
,
givens
=
givens
,
givens
=
givens
,
no_default_updates
=
no_default_updates
,
accept_inplace
=
accept_inplace
,
name
=
name
)
accept_inplace
=
accept_inplace
,
name
=
name
)
theano/compile/pfunc.py
浏览文件 @
cfecf720
差异被折叠。
点击展开。
theano/compile/sharedvalue.py
浏览文件 @
cfecf720
...
@@ -28,6 +28,11 @@ class SharedVariable(Variable):
...
@@ -28,6 +28,11 @@ class SharedVariable(Variable):
:type: `Container`
:type: `Container`
"""
"""
# default_update
# If this member is present, its value will be used as the "update" for
# this Variable, unless another update value has been passed to "function",
# or the "no_default_updates" list passed to "function" contains it.
def
__init__
(
self
,
name
,
type
,
value
,
strict
,
container
=
None
):
def
__init__
(
self
,
name
,
type
,
value
,
strict
,
container
=
None
):
"""
"""
:param name: The name for this variable (see `Variable`).
:param name: The name for this variable (see `Variable`).
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论