Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
c91992f5
提交
c91992f5
authored
7月 16, 2015
作者:
Iban Harlouchet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
__props__ for theano/tensor/subtensor.py
上级
40b93f1d
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
5 行增加
和
18 行删除
+5
-18
subtensor.py
theano/tensor/subtensor.py
+5
-18
没有找到文件。
theano/tensor/subtensor.py
浏览文件 @
c91992f5
...
@@ -292,6 +292,7 @@ class Subtensor(Op):
...
@@ -292,6 +292,7 @@ class Subtensor(Op):
check_input
=
False
check_input
=
False
view_map
=
{
0
:
[
0
]}
view_map
=
{
0
:
[
0
]}
_f16_ok
=
True
_f16_ok
=
True
__props__
=
(
"idx_list"
,)
@staticmethod
@staticmethod
def
collapse
(
idxs
,
cond
):
def
collapse
(
idxs
,
cond
):
...
@@ -567,9 +568,6 @@ class Subtensor(Op):
...
@@ -567,9 +568,6 @@ class Subtensor(Op):
return
rval
return
rval
def
__eq__
(
self
,
other
):
return
type
(
self
)
==
type
(
other
)
and
self
.
idx_list
==
other
.
idx_list
def
__hash__
(
self
):
def
__hash__
(
self
):
# TODO: optimize by cache this hash value
# TODO: optimize by cache this hash value
msg
=
[]
msg
=
[]
...
@@ -1174,6 +1172,8 @@ class IncSubtensor(Op):
...
@@ -1174,6 +1172,8 @@ class IncSubtensor(Op):
"""
"""
check_input
=
False
check_input
=
False
__props__
=
(
"idx_list"
,
"inplace"
,
"set_instead_of_inc"
,
"destroyhandler_tolerate_aliased"
)
def
__init__
(
self
,
idx_list
,
inplace
=
False
,
set_instead_of_inc
=
False
,
def
__init__
(
self
,
idx_list
,
inplace
=
False
,
set_instead_of_inc
=
False
,
destroyhandler_tolerate_aliased
=
None
):
destroyhandler_tolerate_aliased
=
None
):
...
@@ -1187,12 +1187,6 @@ class IncSubtensor(Op):
...
@@ -1187,12 +1187,6 @@ class IncSubtensor(Op):
destroyhandler_tolerate_aliased
)
destroyhandler_tolerate_aliased
)
self
.
set_instead_of_inc
=
set_instead_of_inc
self
.
set_instead_of_inc
=
set_instead_of_inc
def
__eq__
(
self
,
other
):
return
(
type
(
self
)
==
type
(
other
)
and
self
.
idx_list
==
other
.
idx_list
and
self
.
inplace
==
other
.
inplace
and
self
.
set_instead_of_inc
==
other
.
set_instead_of_inc
)
def
__hash__
(
self
):
def
__hash__
(
self
):
msg
=
[]
msg
=
[]
for
entry
in
self
.
idx_list
:
for
entry
in
self
.
idx_list
:
...
@@ -2033,15 +2027,7 @@ class AdvancedSubtensor(Op):
...
@@ -2033,15 +2027,7 @@ class AdvancedSubtensor(Op):
# Should be used by __getitem__ and __getslice__, as follow:
# Should be used by __getitem__ and __getslice__, as follow:
# AdvancedSubtensor()(self, *args),
# AdvancedSubtensor()(self, *args),
# if args contains and advanced indexing pattern
# if args contains and advanced indexing pattern
__props__
=
()
def
__eq__
(
self
,
other
):
return
self
.
__class__
==
other
.
__class__
def
__hash__
(
self
):
return
hash
(
self
.
__class__
)
def
__str__
(
self
):
return
self
.
__class__
.
__name__
def
make_node
(
self
,
x
,
*
index
):
def
make_node
(
self
,
x
,
*
index
):
x
=
theano
.
tensor
.
as_tensor_variable
(
x
)
x
=
theano
.
tensor
.
as_tensor_variable
(
x
)
...
@@ -2116,6 +2102,7 @@ class AdvancedIncSubtensor(Op):
...
@@ -2116,6 +2102,7 @@ class AdvancedIncSubtensor(Op):
op.
op.
"""
"""
__props__
=
(
"inplace"
,
"set_instead_of_inc"
)
def
__init__
(
self
,
inplace
=
False
,
set_instead_of_inc
=
False
):
def
__init__
(
self
,
inplace
=
False
,
set_instead_of_inc
=
False
):
self
.
inplace
=
inplace
self
.
inplace
=
inplace
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论