Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
8ba7b59a
提交
8ba7b59a
authored
12月 20, 2012
作者:
Jeremiah Lowin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docstring updates
上级
e99bee59
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
11 行删除
+14
-11
basic.py
theano/tensor/basic.py
+14
-11
没有找到文件。
theano/tensor/basic.py
浏览文件 @
8ba7b59a
...
...
@@ -7114,25 +7114,28 @@ def dot(a, b):
"""
Computes the dot product of two variables. For two matrices, this is
equivalent to matrix multiplication. For two vectors, this is the inner
product. When one variable is a scalar,
it
is like elementwise
multiplication. For N dimensions,
it
is a sum product over the last axis
product. When one variable is a scalar,
this
is like elementwise
multiplication. For N dimensions,
this
is a sum product over the last axis
of the first array and the second-to-last axis of the second array:
dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m])
Note that this dot function will do one of three things, in this sequence:
Note that this dot function does one of three things, in the following
sequence:
1. If either a or b is scalar, it returns the elementwise product
without calling the
Dot op.
without calling the Theano
Dot op.
2. If either a or b has more than 2 dimensions, it calls the tensordot
function instead of the Dot op. Tensordot expresses high-dimensional
dot products as matrix multiplication and is faster than using a
high-dimensional Dot op.
2. If either a or b has more than 2 dimensions, it calls Theano's
tensordot function with appropriate axes. The tensordot function
expresses high-dimensional dot products in terms of 2D matrix
multiplications, so it may be possible to futherize optimize for
performance.
3. Otherwise, calls the Dot op on a and b.
3. If both a and b have either 1 or 2 dimensions, it calls Theano's
Dot op on a and b.
:note: matrix-matrix products are sometimes optimized to Dot22 ops
(see tensor.blas)
:note: matrix-matrix products are sometimes optimized to Dot22 ops.
:note: non matrix-matrix products (including matrix-vector
products) are handled by numpy. Ensure that you have linked numpy
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论