Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
5123ad72
提交
5123ad72
authored
5月 15, 2015
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Small doc formating fix
上级
5633da0c
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
13 行增加
和
7 行删除
+13
-7
basic.py
theano/tensor/basic.py
+11
-6
extra_ops.py
theano/tensor/extra_ops.py
+2
-1
没有找到文件。
theano/tensor/basic.py
浏览文件 @
5123ad72
...
@@ -3306,13 +3306,15 @@ def addbroadcast(x, *axes):
...
@@ -3306,13 +3306,15 @@ def addbroadcast(x, *axes):
Input theano tensor.
Input theano tensor.
axis : an int or an iterable object such as list or tuple
axis : an int or an iterable object such as list or tuple
of int values
of int values
The dimension along which the tensor x should be broadcastable.
if the length of x along these dimensions is not 1,
The dimension along which the tensor x should be
a ValueError will be raised.
broadcastable. if the length of x along these
dimensions is not 1, a ValueError will be raised.
returns:
returns:
----------
----------
a theano tensor, which is broadcastable along the specified dimensions.
a theano tensor, which is broadcastable along the specified dimensions.
"""
"""
rval
=
Rebroadcast
(
*
[(
axis
,
True
)
for
axis
in
axes
])(
x
)
rval
=
Rebroadcast
(
*
[(
axis
,
True
)
for
axis
in
axes
])(
x
)
return
theano
.
tensor
.
opt
.
apply_rebroadcast_opt
(
rval
)
return
theano
.
tensor
.
opt
.
apply_rebroadcast_opt
(
rval
)
...
@@ -3334,13 +3336,15 @@ def unbroadcast(x, *axes):
...
@@ -3334,13 +3336,15 @@ def unbroadcast(x, *axes):
Input theano tensor.
Input theano tensor.
axis : an int or an iterable object such as list or tuple
axis : an int or an iterable object such as list or tuple
of int values
of int values
The dimension along which the tensor x should be unbroadcastable.
if the length of x along these dimensions is not 1,
The dimension along which the tensor x should be
a ValueError will be raised.
unbroadcastable. if the length of x along these
dimensions is not 1, a ValueError will be raised.
returns:
returns:
----------
----------
a theano tensor, which is unbroadcastable along the specified dimensions.
a theano tensor, which is unbroadcastable along the specified dimensions.
"""
"""
rval
=
Rebroadcast
(
*
[(
axis
,
False
)
for
axis
in
axes
])(
x
)
rval
=
Rebroadcast
(
*
[(
axis
,
False
)
for
axis
in
axes
])(
x
)
return
theano
.
tensor
.
opt
.
apply_rebroadcast_opt
(
rval
)
return
theano
.
tensor
.
opt
.
apply_rebroadcast_opt
(
rval
)
...
@@ -3363,6 +3367,7 @@ def patternbroadcast(x, broadcastable):
...
@@ -3363,6 +3367,7 @@ def patternbroadcast(x, broadcastable):
Input theano tensor.
Input theano tensor.
broadcastable : an iterable object such as list or tuple
broadcastable : an iterable object such as list or tuple
of bool values
of bool values
a set of boolean values indicating whether a dimension
a set of boolean values indicating whether a dimension
should be broadcastable or not.
should be broadcastable or not.
if the length of x along these dimensions is not 1,
if the length of x along these dimensions is not 1,
...
...
theano/tensor/extra_ops.py
浏览文件 @
5123ad72
...
@@ -456,6 +456,7 @@ def bincount(x, weights=None, minlength=None, assert_nonneg=False):
...
@@ -456,6 +456,7 @@ def bincount(x, weights=None, minlength=None, assert_nonneg=False):
:param assert_nonneg: A flag that inserts an assert_op to check if
:param assert_nonneg: A flag that inserts an assert_op to check if
every input x is nonnegative.
every input x is nonnegative.
Optional.
Optional.
.. versionadded:: 0.6
.. versionadded:: 0.6
"""
"""
compatible_type
=
(
'int8'
,
'int16'
,
'int32'
,
'int64'
,
compatible_type
=
(
'int8'
,
'int16'
,
'int32'
,
'int64'
,
...
@@ -521,7 +522,7 @@ def compress(condition, x, axis=None):
...
@@ -521,7 +522,7 @@ def compress(condition, x, axis=None):
:param x: Input data, tensor variable
:param x: Input data, tensor variable
:param condition: 1 dimensional array of non-zero and zero values
:param condition: 1 dimensional array of non-zero and zero values
corresponding to indices of slices along a selected axis
corresponding to indices of slices along a selected axis
:return: `x` with selected slices
:return: `x` with selected slices
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论