Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
b0d922e9
提交
b0d922e9
authored
6月 06, 2014
作者:
Hengjean
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added check-input to <class 'theano.tensor.subtensor.Subtensor'>
<class 'theano.tensor.subtensor.IncSubtensor'> <class 'theano.tensor.elemwise.DimShuffle'>
上级
67ff204d
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
7 行增加
和
3 行删除
+7
-3
elemwise.py
theano/tensor/elemwise.py
+3
-1
subtensor.py
theano/tensor/subtensor.py
+4
-2
没有找到文件。
theano/tensor/elemwise.py
浏览文件 @
b0d922e9
...
@@ -95,6 +95,8 @@ class DimShuffle(Op):
...
@@ -95,6 +95,8 @@ class DimShuffle(Op):
Adding, subtracting dimensions can be done with reshape.
Adding, subtracting dimensions can be done with reshape.
"""
"""
check_input
=
False
def
__init__
(
self
,
input_broadcastable
,
new_order
,
inplace
=
False
):
def
__init__
(
self
,
input_broadcastable
,
new_order
,
inplace
=
False
):
"""
"""
Usage: DimShuffle(input_broadcastable, new_order, inplace = False)
Usage: DimShuffle(input_broadcastable, new_order, inplace = False)
...
@@ -369,7 +371,7 @@ PyArray_SetBaseObject(%(res)s, (PyObject*)%(basename)s);
...
@@ -369,7 +371,7 @@ PyArray_SetBaseObject(%(res)s, (PyObject*)%(basename)s);
return
full_code
%
dict
(
locals
(),
**
sub
)
return
full_code
%
dict
(
locals
(),
**
sub
)
def
c_code_cache_version
(
self
):
def
c_code_cache_version
(
self
):
return
(
2
,)
return
(
3
,)
def
grad
(
self
,
inp
,
grads
):
def
grad
(
self
,
inp
,
grads
):
x
,
=
inp
x
,
=
inp
...
...
theano/tensor/subtensor.py
浏览文件 @
b0d922e9
...
@@ -277,7 +277,7 @@ class Subtensor(Op):
...
@@ -277,7 +277,7 @@ class Subtensor(Op):
e_subslice
=
'nested slicing is not supported'
e_subslice
=
'nested slicing is not supported'
e_indextype
=
"Invalid index type or slice for Subtensor"
e_indextype
=
"Invalid index type or slice for Subtensor"
debug
=
0
debug
=
0
check_input
=
False
view_map
=
{
0
:
[
0
]}
view_map
=
{
0
:
[
0
]}
@staticmethod
@staticmethod
...
@@ -892,7 +892,7 @@ class Subtensor(Op):
...
@@ -892,7 +892,7 @@ class Subtensor(Op):
# have a versioned version of this op's C code.
# have a versioned version of this op's C code.
if
len
(
hv
)
==
0
:
if
len
(
hv
)
==
0
:
return
()
return
()
return
(
2
,
hv
)
return
(
3
,
hv
)
def
R_op
(
self
,
inputs
,
eval_points
):
def
R_op
(
self
,
inputs
,
eval_points
):
# Subtensor is not differentiable wrt to its indices, therefore we
# Subtensor is not differentiable wrt to its indices, therefore we
...
@@ -1074,6 +1074,8 @@ class IncSubtensor(Op):
...
@@ -1074,6 +1074,8 @@ class IncSubtensor(Op):
of incrementing it by that value.
of incrementing it by that value.
"""
"""
check_input
=
False
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
):
if
destroyhandler_tolerate_aliased
is
None
:
if
destroyhandler_tolerate_aliased
is
None
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论