Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
cdafffc7
提交
cdafffc7
authored
9月 05, 2012
作者:
Ian Goodfellow
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
upgraded shape op's connection_pattern to the new type
made elemwise ops handle DisconnectedType correctly
上级
bf0e90ff
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
6 行增加
和
1 行删除
+6
-1
basic.py
theano/scalar/basic.py
+2
-0
basic.py
theano/tensor/basic.py
+1
-1
elemwise.py
theano/tensor/elemwise.py
+3
-0
没有找到文件。
theano/scalar/basic.py
浏览文件 @
cdafffc7
...
@@ -26,6 +26,8 @@ from theano.gof import Op, utils, Variable, Constant, Type, Apply, FunctionGraph
...
@@ -26,6 +26,8 @@ from theano.gof import Op, utils, Variable, Constant, Type, Apply, FunctionGraph
from
theano.gof.python25
import
partial
,
all
,
any
from
theano.gof.python25
import
partial
,
all
,
any
from
theano.configparser
import
config
from
theano.configparser
import
config
from
theano.gradient
import
DisconnectedType
builtin_complex
=
complex
builtin_complex
=
complex
builtin_int
=
int
builtin_int
=
int
builtin_float
=
float
builtin_float
=
float
...
...
theano/tensor/basic.py
浏览文件 @
cdafffc7
...
@@ -2103,7 +2103,7 @@ class Shape(Op):
...
@@ -2103,7 +2103,7 @@ class Shape(Op):
# the elements of the tensor variable do not participate
# the elements of the tensor variable do not participate
# in the computation of the shape, so they are not really
# in the computation of the shape, so they are not really
# part of the graph
# part of the graph
return
[
False
]
return
[
[
False
]
]
def
grad
(
self
,
inp
,
grads
):
def
grad
(
self
,
inp
,
grads
):
# the grad returns the gradient with respect to the
# the grad returns the gradient with respect to the
...
...
theano/tensor/elemwise.py
浏览文件 @
cdafffc7
...
@@ -14,6 +14,7 @@ from theano.scalar import Scalar
...
@@ -14,6 +14,7 @@ from theano.scalar import Scalar
from
theano.printing
import
min_informative_str
,
pprint
from
theano.printing
import
min_informative_str
,
pprint
from
theano.gof.python25
import
all
,
any
from
theano.gof.python25
import
all
,
any
from
theano.tensor.utils
import
hash_from_dict
from
theano.tensor.utils
import
hash_from_dict
from
theano.gradient
import
DisconnectedType
config
=
theano
.
config
config
=
theano
.
config
...
@@ -680,6 +681,8 @@ class Elemwise(Op):
...
@@ -680,6 +681,8 @@ class Elemwise(Op):
def
transform
(
r
):
def
transform
(
r
):
# From a graph of ScalarOps, make a graph of Broadcast ops.
# From a graph of ScalarOps, make a graph of Broadcast ops.
if
isinstance
(
r
.
type
,
DisconnectedType
):
return
r
if
r
in
scalar_inputs
:
if
r
in
scalar_inputs
:
return
inputs
[
scalar_inputs
.
index
(
r
)]
return
inputs
[
scalar_inputs
.
index
(
r
)]
if
r
in
scalar_ograds
:
if
r
in
scalar_ograds
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论