Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
39135ff6
提交
39135ff6
authored
11月 05, 2015
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pep8 and docstring format
上级
99f7fff7
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
7 行增加
和
9 行删除
+7
-9
fg.py
theano/gof/fg.py
+5
-7
var.py
theano/tensor/var.py
+2
-2
没有找到文件。
theano/gof/fg.py
浏览文件 @
39135ff6
...
@@ -289,17 +289,16 @@ class FunctionGraph(utils.object2):
...
@@ -289,17 +289,16 @@ class FunctionGraph(utils.object2):
Parameters
Parameters
----------
----------
r
r
: Variable
Variable
.
The clients of r will be removed
.
clients_to_remove
clients_to_remove
: List of (op, i) pairs
List of (op, i) pairs such that node.inputs[i] is not r anymore.
List of (op, i) pairs such that node.inputs[i] is not r anymore.
prune
prune
: bool
If prune is True, it remove r from this fgraph if it don't
If prune is True, it remove r from this fgraph if it don't
have clients left.
have clients left.
Returns
Returns
-------
-------
True if r is still in the fgraph and need to be pruned
True if r is still in the fgraph and need to be pruned
later. This can happen only when prune is False. A second call
later. This can happen only when prune is False. A second call
to this method with an empty list for clients_to_remove and
to this method with an empty list for clients_to_remove and
...
@@ -491,7 +490,6 @@ class FunctionGraph(utils.object2):
...
@@ -491,7 +490,6 @@ class FunctionGraph(utils.object2):
assert
node
.
fgraph
is
self
assert
node
.
fgraph
is
self
self
.
execute_callbacks
(
'on_import'
,
node
,
reason
)
self
.
execute_callbacks
(
'on_import'
,
node
,
reason
)
# change input #
# change input #
def
change_input
(
self
,
node
,
i
,
new_r
,
reason
=
None
):
def
change_input
(
self
,
node
,
i
,
new_r
,
reason
=
None
):
"""
"""
...
@@ -536,7 +534,7 @@ class FunctionGraph(utils.object2):
...
@@ -536,7 +534,7 @@ class FunctionGraph(utils.object2):
# transaction will be reverted later.
# transaction will be reverted later.
self
.
execute_callbacks
(
'on_change_input'
,
node
,
i
,
self
.
execute_callbacks
(
'on_change_input'
,
node
,
i
,
r
,
new_r
,
reason
=
reason
)
r
,
new_r
,
reason
=
reason
)
prune
=
self
.
__remove_clients__
(
r
,
[],
True
)
self
.
__remove_clients__
(
r
,
[],
True
)
# replace #
# replace #
def
replace
(
self
,
r
,
new_r
,
reason
=
None
,
verbose
=
None
):
def
replace
(
self
,
r
,
new_r
,
reason
=
None
,
verbose
=
None
):
...
...
theano/tensor/var.py
浏览文件 @
39135ff6
...
@@ -375,8 +375,8 @@ class _tensor_py_operators(object):
...
@@ -375,8 +375,8 @@ class _tensor_py_operators(object):
If `target` is `'cpu'` this will transfer to a TensorType (if
If `target` is `'cpu'` this will transfer to a TensorType (if
not already one). Other types may define additional targets.
not already one). Other types may define additional targets.
Paramters
Param
e
ters
---------
---------
-
target : str
target : str
The desired location of the output variable
The desired location of the output variable
"""
"""
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论