Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
275ffe7e
提交
275ffe7e
authored
2月 03, 2016
作者:
Frédéric Bastien
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3984 from nouiz/Param
Add back Param and make it deprecated
上级
42318305
5fe75edc
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
21 行增加
和
3 行删除
+21
-3
__init__.py
theano/__init__.py
+1
-1
__init__.py
theano/compile/__init__.py
+1
-1
pfunc.py
theano/compile/pfunc.py
+19
-1
没有找到文件。
theano/__init__.py
浏览文件 @
275ffe7e
...
@@ -67,7 +67,7 @@ from theano.compile import (
...
@@ -67,7 +67,7 @@ from theano.compile import (
predefined_modes
,
predefined_linkers
,
predefined_optimizers
,
predefined_modes
,
predefined_linkers
,
predefined_optimizers
,
FunctionMaker
,
function
,
function_dump
,
OpFromGraph
,
FunctionMaker
,
function
,
function_dump
,
OpFromGraph
,
ProfileMode
,
ProfileStats
,
ProfileMode
,
ProfileStats
,
shared
,
as_op
)
Param
,
shared
,
as_op
)
from
theano.misc.safe_asarray
import
_asarray
from
theano.misc.safe_asarray
import
_asarray
...
...
theano/compile/__init__.py
浏览文件 @
275ffe7e
...
@@ -22,7 +22,7 @@ from theano.compile.profilemode import ProfileMode
...
@@ -22,7 +22,7 @@ from theano.compile.profilemode import ProfileMode
from
theano.compile.sharedvalue
import
(
shared
,
shared_constructor
,
from
theano.compile.sharedvalue
import
(
shared
,
shared_constructor
,
SharedVariable
)
SharedVariable
)
from
theano.compile.pfunc
import
pfunc
,
rebuild_collect_shared
from
theano.compile.pfunc
import
pfunc
,
Param
,
rebuild_collect_shared
from
theano.compile.builders
import
*
from
theano.compile.builders
import
*
...
...
theano/compile/pfunc.py
浏览文件 @
275ffe7e
...
@@ -2,8 +2,11 @@
...
@@ -2,8 +2,11 @@
Provide a simple user friendly API.
Provide a simple user friendly API.
"""
"""
from
theano
import
config
import
warnings
from
six
import
iteritems
from
six
import
iteritems
from
theano
import
config
from
theano.compile
import
orig_function
,
In
,
Out
from
theano.compile
import
orig_function
,
In
,
Out
from
theano.compile
import
UnusedInputError
from
theano.compile
import
UnusedInputError
from
theano.compile.sharedvalue
import
SharedVariable
,
shared
from
theano.compile.sharedvalue
import
SharedVariable
,
shared
...
@@ -261,6 +264,21 @@ def rebuild_collect_shared(outputs,
...
@@ -261,6 +264,21 @@ def rebuild_collect_shared(outputs,
[
clone_d
,
update_d
,
update_expr
,
shared_inputs
])
[
clone_d
,
update_d
,
update_expr
,
shared_inputs
])
class
Param
(
In
):
"""Deprecated. Use In instead."""
def
__init__
(
self
,
variable
,
default
=
None
,
name
=
None
,
mutable
=
False
,
strict
=
False
,
allow_downcast
=
None
,
implicit
=
None
,
borrow
=
None
):
warnings
.
warn
(
"The Param class is deprecated. Replace Param(default=N)"
" by theano.In(value=N)"
,
stacklevel
=
2
)
super
(
Param
,
self
)
.
__init__
(
variable
,
name
=
name
,
value
=
default
,
mutable
=
mutable
,
strict
=
strict
,
allow_downcast
=
allow_downcast
,
implicit
=
implicit
,
borrow
=
borrow
)
def
pfunc
(
params
,
outputs
=
None
,
mode
=
None
,
updates
=
None
,
givens
=
None
,
def
pfunc
(
params
,
outputs
=
None
,
mode
=
None
,
updates
=
None
,
givens
=
None
,
no_default_updates
=
False
,
accept_inplace
=
False
,
name
=
None
,
no_default_updates
=
False
,
accept_inplace
=
False
,
name
=
None
,
rebuild_strict
=
True
,
allow_input_downcast
=
None
,
rebuild_strict
=
True
,
allow_input_downcast
=
None
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论