Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
1292c242
提交
1292c242
authored
11月 15, 2020
作者:
Brandon T. Willard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unnecessary comments
上级
3ebfdafd
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
0 行增加
和
52 行删除
+0
-52
test_basic.py
tests/scan/test_basic.py
+0
-29
debugmode.py
theano/compile/debugmode.py
+0
-19
opt.py
theano/tensor/opt.py
+0
-4
没有找到文件。
tests/scan/test_basic.py
浏览文件 @
1292c242
...
@@ -1053,35 +1053,6 @@ class TestScan:
...
@@ -1053,35 +1053,6 @@ class TestScan:
vu2
=
asarrayX
(
rng
.
rand
(
3
,
3
))
vu2
=
asarrayX
(
rng
.
rand
(
3
,
3
))
vy0
=
asarrayX
(
rng
.
rand
(
3
,
2
))
vy0
=
asarrayX
(
rng
.
rand
(
3
,
2
))
vy1
=
asarrayX
(
rng
.
rand
(
2
))
vy1
=
asarrayX
(
rng
.
rand
(
2
))
# Their is a bug when floatX=float32 when we remove this line.
# The trace back is:
# Traceback (most recent call last):
# File "/u/bastienf/repos/Theano/tests/scan/test_basic.py", line 434, in test_shared_arguments_with_updates
# theano_y0,theano_y1,theano_y2 = f10(vu2, vy0)
# File "/u/bastienf/repos/theano/compile/function/types.py", line 480, in __call__
# self.fn()
# File "/u/bastienf/repos/theano/compile/profilemode.py", line 59, in profile_f
# raise_with_op(node)
# File "/u/bastienf/repos/theano/compile/profilemode.py", line 52, in profile_f
# th()
# File "/u/bastienf/repos/theano/gof/cc.py", line 1141, in <lambda>
# thunk = lambda p = p, i = node_input_storage, o = node_output_storage, n = node: p(n, [x[0] for x in i], o)
# File "/u/bastienf/repos/theano/scan/op.py", line 922, in perform
# inplace_map)
# File "/u/bastienf/repos/theano/scan/basic.py", line 1054, in scan
# something = fn(*fn_args)
# File "/u/bastienf/repos/theano/compile/function/types.py", line 458, in __call__
# s.storage[0] = s.type.filter(arg, strict=s.strict)
# File "/u/bastienf/repos/theano/tensor/basic.py", line 415, in filter
# data = theano._asarray(data, dtype = self.dtype) #TODO - consider to pad shape with ones
# File "/u/bastienf/repos/theano/misc/safe_asarray.py", line 30, in _asarray
# rval = numpy.asarray(a, dtype=dtype, order=order)
# File "/u/lisa/local/byhost/ceylon.iro.umontreal.ca//lib64/python2.5/site-packages/numpy/core/numeric.py", line 230, in asarray
# return array(a, dtype, copy=False, order=order)
# TypeError: ('__array__() takes no arguments (1 given)', <Scan object at 0x3dbbf90>(?_steps, u1, u2, y0, y1, 0.0, W1, W2), 'Sequence id of Apply node=0')
#
# This don't seam to be a theano related bug...
vu1
=
asarrayX
(
rng
.
rand
(
3
,
2
))
vu1
=
asarrayX
(
rng
.
rand
(
3
,
2
))
W1
=
theano
.
shared
(
vW1
,
"W1"
)
W1
=
theano
.
shared
(
vW1
,
"W1"
)
...
...
theano/compile/debugmode.py
浏览文件 @
1292c242
...
@@ -53,11 +53,6 @@ class NoDuplicateOptWarningFilter(logging.Filter):
...
@@ -53,11 +53,6 @@ class NoDuplicateOptWarningFilter(logging.Filter):
_logger
.
addFilter
(
NoDuplicateOptWarningFilter
())
_logger
.
addFilter
(
NoDuplicateOptWarningFilter
())
########################
#
# Exceptions
#
########################
class
DebugModeError
(
Exception
):
class
DebugModeError
(
Exception
):
"""
"""
Generic Exception raised to indicate an internal theano problem.
Generic Exception raised to indicate an internal theano problem.
...
@@ -362,13 +357,6 @@ class InvalidValueError(DebugModeError):
...
@@ -362,13 +357,6 @@ class InvalidValueError(DebugModeError):
"""
"""
########################
#
# Private Functions
#
########################
def
str_diagnostic
(
expected
,
value
,
rtol
,
atol
):
def
str_diagnostic
(
expected
,
value
,
rtol
,
atol
):
"""Return a pretty multiline string representating the cause
"""Return a pretty multiline string representating the cause
of the exception"""
of the exception"""
...
@@ -2594,13 +2582,6 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
...
@@ -2594,13 +2582,6 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
]
]
########################
#
# API symbol: DebugMode
#
########################
class
DebugMode
(
Mode
):
class
DebugMode
(
Mode
):
"""
"""
Evaluation Mode that detects internal theano errors.
Evaluation Mode that detects internal theano errors.
...
...
theano/tensor/opt.py
浏览文件 @
1292c242
...
@@ -1455,10 +1455,6 @@ class ShapeFeature:
...
@@ -1455,10 +1455,6 @@ class ShapeFeature:
def
make_vector_shape
(
self
,
r
):
def
make_vector_shape
(
self
,
r
):
return
make_vector
(
*
self
.
shape_of
[
r
])
return
make_vector
(
*
self
.
shape_of
[
r
])
#
# Feature interface
#
#
def
on_attach
(
self
,
fgraph
):
def
on_attach
(
self
,
fgraph
):
assert
not
hasattr
(
fgraph
,
"shape_feature"
)
assert
not
hasattr
(
fgraph
,
"shape_feature"
)
fgraph
.
shape_feature
=
self
fgraph
.
shape_feature
=
self
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论