Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
fac5027f
提交
fac5027f
authored
4月 17, 2008
作者:
bergstrj@iro.umontreal.ca
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
new doc
上级
6053aad7
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
6 行删除
+11
-6
base_tensor.py
base_tensor.py
+11
-6
没有找到文件。
base_tensor.py
浏览文件 @
fac5027f
...
...
@@ -14,9 +14,13 @@ class BaseTensor(Result):
L{Result} to store L{numpy.ndarray} or equivalent via .data
@type _dtype: numpy dtype string such as 'int64' or 'float64' (among others)
@type _broadcastable: - tuple of ints in (0,1)
@ivar _broadcastable: which dimensions of this tensor are guaranteed
to be 1, and up for broadcasting.
@type _broadcastable: tuple or list or array of boolean values, whose length
is the number of dimensions of the contained L{ndarray}.
@ivar _broadcastable: Each element of the broadcastable vector tells us
something about the corresponding dimension:
- False means the dimension can be anything.
- True means the dimension must be 1. Also, this dimension will be considered
for L{broadcasting}, as described and implemented in Numpy.
Properties:
dtype - read-only access to _dtype, which should not be changed
...
...
@@ -24,13 +28,14 @@ class BaseTensor(Result):
This class does not implement python operators and has no dependencies
on the L{Op}s that use it.
@todo At some point we should document a glossary, such as terms like
broadcasting and shape.
"""
def
__init__
(
self
,
dtype
,
broadcastable
,
name
=
None
):
"""Initialize a L{Tensor}
"""Initialize a L{
Base
Tensor}
@todo: Initialize a L{Tensor} or a L{BaseTensor}? -jpt
@note: This does not actually allocate any data.
"""
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论