Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
451343c4
提交
451343c4
authored
12月 01, 2010
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
white space fix
上级
7cc17ae7
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
4 行增加
和
6 行删除
+4
-6
basic.py
theano/tensor/basic.py
+4
-4
test_basic.py
theano/tensor/tests/test_basic.py
+0
-2
没有找到文件。
theano/tensor/basic.py
浏览文件 @
451343c4
...
@@ -1505,7 +1505,7 @@ class SpecifyShape(Op):
...
@@ -1505,7 +1505,7 @@ class SpecifyShape(Op):
L{Op} put into the graph the user provided shape
L{Op} put into the graph the user provided shape
In the case where this op stay in the final graph, we assert the shape.
In the case where this op stay in the final graph, we assert the shape.
For this the output of this op must be used in the graph. This is not
For this the output of this op must be used in the graph. This is not
the case most of the time if we only take the shape of the output.
the case most of the time if we only take the shape of the output.
Maybe there is other optimization that will mess with this.
Maybe there is other optimization that will mess with this.
...
@@ -1524,12 +1524,12 @@ class SpecifyShape(Op):
...
@@ -1524,12 +1524,12 @@ class SpecifyShape(Op):
x
=
as_tensor_variable
(
x
)
x
=
as_tensor_variable
(
x
)
shape
=
as_tensor_variable
(
shape
)
shape
=
as_tensor_variable
(
shape
)
return
Apply
(
self
,
[
x
,
shape
],
[
x
.
type
()])
return
Apply
(
self
,
[
x
,
shape
],
[
x
.
type
()])
def
perform
(
self
,
node
,
(
x
,
shape
),
(
out
,
)):
def
perform
(
self
,
node
,
(
x
,
shape
),
(
out
,
)):
assert
numpy
.
all
(
x
.
shape
==
shape
),
(
"got shape"
,
x
.
shape
,
assert
numpy
.
all
(
x
.
shape
==
shape
),
(
"got shape"
,
x
.
shape
,
"expected"
,
shape
)
"expected"
,
shape
)
out
[
0
]
=
x
out
[
0
]
=
x
def
infer_shape
(
self
,
node
,
(
xshape
,
sshape
)):
def
infer_shape
(
self
,
node
,
(
xshape
,
sshape
)):
new_shape
=
[]
new_shape
=
[]
for
dim
in
range
(
node
.
inputs
[
0
]
.
ndim
):
for
dim
in
range
(
node
.
inputs
[
0
]
.
ndim
):
...
@@ -2276,7 +2276,7 @@ def std(input, axis=None):
...
@@ -2276,7 +2276,7 @@ def std(input, axis=None):
:type axis: None or int or (list of int) (see `Sum`)
:type axis: None or int or (list of int) (see `Sum`)
"""
"""
return
sqrt
(
var
(
input
=
input
,
axis
=
axis
))
return
sqrt
(
var
(
input
=
input
,
axis
=
axis
))
if
0
:
if
0
:
## COMMENTED OUT FEB 17 2010
## COMMENTED OUT FEB 17 2010
## TODO (DOCUMENT AND WRITE TESTS) OR DELETE
## TODO (DOCUMENT AND WRITE TESTS) OR DELETE
...
...
theano/tensor/tests/test_basic.py
浏览文件 @
451343c4
...
@@ -3463,5 +3463,3 @@ if __name__ == '__main__':
...
@@ -3463,5 +3463,3 @@ if __name__ == '__main__':
suite
=
unittest
.
TestLoader
()
suite
=
unittest
.
TestLoader
()
suite
=
suite
.
loadTestsFromTestCase
(
testcase
)
suite
=
suite
.
loadTestsFromTestCase
(
testcase
)
unittest
.
TextTestRunner
(
verbosity
=
2
)
.
run
(
suite
)
unittest
.
TextTestRunner
(
verbosity
=
2
)
.
run
(
suite
)
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论