Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
07b866b5
提交
07b866b5
authored
8月 01, 2013
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move fct in the only file it is used. the reorganization didn't move it to the right place.
上级
87c4b66d
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
10 行增加
和
10 行删除
+10
-10
subtensor.py
theano/tensor/subtensor.py
+1
-10
type_other.py
theano/tensor/type_other.py
+9
-0
没有找到文件。
theano/tensor/subtensor.py
浏览文件 @
07b866b5
...
@@ -19,7 +19,7 @@ from theano import scalar as scal
...
@@ -19,7 +19,7 @@ from theano import scalar as scal
from
theano.tensor.basic
import
(
addbroadcast
,
clip
,
sum
,
exp
,
from
theano.tensor.basic
import
(
addbroadcast
,
clip
,
sum
,
exp
,
ARange
,
TensorType
)
ARange
,
TensorType
)
from
theano.tensor.elemwise
import
DimShuffle
from
theano.tensor.elemwise
import
DimShuffle
from
theano.tensor.type_other
import
NoneConst
,
SliceType
from
theano.tensor.type_other
import
NoneConst
,
SliceType
,
make_slice
from
theano
import
config
from
theano
import
config
inplace_increment
=
None
inplace_increment
=
None
...
@@ -1770,15 +1770,6 @@ def as_index_variable(idx):
...
@@ -1770,15 +1770,6 @@ def as_index_variable(idx):
return
idx
return
idx
def
as_int_none_variable
(
x
):
if
x
is
None
:
return
NoneConst
x
=
theano
.
tensor
.
as_tensor_variable
(
x
,
ndim
=
0
)
if
x
.
type
.
dtype
[:
3
]
not
in
(
'int'
,
'uin'
):
raise
TypeError
(
'index must be integers'
)
return
x
def
adv_index_broadcastable_pattern
(
a
,
idx
):
def
adv_index_broadcastable_pattern
(
a
,
idx
):
"""
"""
This function is only used to determine the broadcast pattern for
This function is only used to determine the broadcast pattern for
...
...
theano/tensor/type_other.py
浏览文件 @
07b866b5
...
@@ -5,6 +5,15 @@ from theano.gof import Apply, Constant, Op, Type
...
@@ -5,6 +5,15 @@ from theano.gof import Apply, Constant, Op, Type
from
theano.gradient
import
DisconnectedType
from
theano.gradient
import
DisconnectedType
def
as_int_none_variable
(
x
):
if
x
is
None
:
return
NoneConst
x
=
theano
.
tensor
.
as_tensor_variable
(
x
,
ndim
=
0
)
if
x
.
type
.
dtype
[:
3
]
not
in
(
'int'
,
'uin'
):
raise
TypeError
(
'index must be integers'
)
return
x
class
MakeSlice
(
Op
):
class
MakeSlice
(
Op
):
def
make_node
(
self
,
slc
):
def
make_node
(
self
,
slc
):
return
Apply
(
self
,
return
Apply
(
self
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论