Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
3c4b014b
提交
3c4b014b
authored
10月 23, 2008
作者:
Olivier Breuleux
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
better serialization
上级
78928528
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
11 行增加
和
2 行删除
+11
-2
io.py
theano/compile/io.py
+3
-0
module.py
theano/compile/module.py
+7
-2
elemwise.py
theano/tensor/elemwise.py
+1
-0
没有找到文件。
theano/compile/io.py
浏览文件 @
3c4b014b
...
@@ -155,6 +155,9 @@ class SymbolicOutput(object):
...
@@ -155,6 +155,9 @@ class SymbolicOutput(object):
self
.
result
=
result
self
.
result
=
result
self
.
borrow
=
borrow
self
.
borrow
=
borrow
def
__str__
(
self
):
return
"Out(
%
s)"
%
self
.
result
Out
=
SymbolicOutput
Out
=
SymbolicOutput
theano/compile/module.py
浏览文件 @
3c4b014b
...
@@ -491,7 +491,7 @@ class Module(Composite):
...
@@ -491,7 +491,7 @@ class Module(Composite):
def
__init__
(
self
,
components
=
{},
**
kwcomponents
):
def
__init__
(
self
,
components
=
{},
**
kwcomponents
):
super
(
Module
,
self
)
.
__init__
()
super
(
Module
,
self
)
.
__init__
()
components
=
dict
(
components
,
**
kwcomponents
)
components
=
dict
(
components
,
**
kwcomponents
)
self
.
_
components
=
components
self
.
_
_dict__
[
'_components'
]
=
components
def
resolve
(
self
,
name
):
def
resolve
(
self
,
name
):
name
=
canonicalize
(
name
)
name
=
canonicalize
(
name
)
...
@@ -589,6 +589,8 @@ class Curry:
...
@@ -589,6 +589,8 @@ class Curry:
class
FancyModuleInstance
(
ModuleInstance
):
class
FancyModuleInstance
(
ModuleInstance
):
def
__getattr__
(
self
,
attr
):
def
__getattr__
(
self
,
attr
):
if
attr
==
'__items__'
and
'__items__'
not
in
self
.
__dict__
:
self
.
__dict__
[
'__items__'
]
=
{}
try
:
try
:
return
self
[
attr
]
return
self
[
attr
]
except
KeyError
:
except
KeyError
:
...
@@ -607,6 +609,8 @@ class FancyModule(Module):
...
@@ -607,6 +609,8 @@ class FancyModule(Module):
return
wrap
(
x
)
return
wrap
(
x
)
def
__getattr__
(
self
,
attr
):
def
__getattr__
(
self
,
attr
):
if
attr
==
'_components'
and
'_components'
not
in
self
.
__dict__
:
self
.
__dict__
[
'_components'
]
=
{}
try
:
try
:
rval
=
self
[
attr
]
rval
=
self
[
attr
]
except
KeyError
:
except
KeyError
:
...
@@ -616,12 +620,13 @@ class FancyModule(Module):
...
@@ -616,12 +620,13 @@ class FancyModule(Module):
return
rval
return
rval
def
__setattr__
(
self
,
attr
,
value
):
def
__setattr__
(
self
,
attr
,
value
):
if
attr
==
'parent'
:
if
attr
in
(
'parent'
,
'_components'
)
:
self
.
__dict__
[
attr
]
=
value
self
.
__dict__
[
attr
]
=
value
return
return
elif
attr
==
'name'
:
elif
attr
==
'name'
:
self
.
__set_name__
(
value
)
self
.
__set_name__
(
value
)
return
return
value
=
self
.
__wrapper__
(
value
)
value
=
self
.
__wrapper__
(
value
)
try
:
try
:
self
[
attr
]
=
value
self
[
attr
]
=
value
...
...
theano/tensor/elemwise.py
浏览文件 @
3c4b014b
...
@@ -262,6 +262,7 @@ class Elemwise(Op):
...
@@ -262,6 +262,7 @@ class Elemwise(Op):
def
__getstate__
(
self
):
def
__getstate__
(
self
):
d
=
copy
(
self
.
__dict__
)
d
=
copy
(
self
.
__dict__
)
d
.
pop
(
'ufunc'
)
d
.
pop
(
'ufunc'
)
d
.
pop
(
'__epydoc_asRoutine'
,
None
)
return
d
return
d
def
__setstate__
(
self
,
d
):
def
__setstate__
(
self
,
d
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论