Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
a81fbe8a
提交
a81fbe8a
authored
7月 24, 2012
作者:
abergeron
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #777 from nouiz/fix_test
Don't test mixing complex output sum with scalar input since the gradient will have to do a complex->scalar cast and it is not well-defined.
上级
4c1ae802
25dfaa8f
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
12 行增加
和
1 行删除
+12
-1
opt.py
theano/sandbox/cuda/opt.py
+2
-0
blas.py
theano/tensor/blas.py
+3
-1
test_elemwise.py
theano/tensor/tests/test_elemwise.py
+7
-0
没有找到文件。
theano/sandbox/cuda/opt.py
浏览文件 @
a81fbe8a
...
@@ -514,6 +514,8 @@ def local_gpu_ger(node):
...
@@ -514,6 +514,8 @@ def local_gpu_ger(node):
tensor
.
blas_c
.
CGer
(
destructive
=
False
):
gpu_ger_no_inplace
,
tensor
.
blas_c
.
CGer
(
destructive
=
False
):
gpu_ger_no_inplace
,
tensor
.
blas
.
Ger
(
destructive
=
True
):
gpu_ger_no_inplace
,
tensor
.
blas
.
Ger
(
destructive
=
True
):
gpu_ger_no_inplace
,
tensor
.
blas
.
Ger
(
destructive
=
False
):
gpu_ger_no_inplace
,
tensor
.
blas
.
Ger
(
destructive
=
False
):
gpu_ger_no_inplace
,
tensor
.
blas_scipy
.
ScipyGer
(
destructive
=
True
):
gpu_ger_no_inplace
,
tensor
.
blas_scipy
.
ScipyGer
(
destructive
=
False
):
gpu_ger_no_inplace
,
}
}
if
node
.
op
==
gpu_from_host
:
if
node
.
op
==
gpu_from_host
:
host_input
=
node
.
inputs
[
0
]
host_input
=
node
.
inputs
[
0
]
...
...
theano/tensor/blas.py
浏览文件 @
a81fbe8a
...
@@ -1399,7 +1399,9 @@ class GemmOptimizer(Optimizer):
...
@@ -1399,7 +1399,9 @@ class GemmOptimizer(Optimizer):
zip
(
node
.
outputs
,
new_outputs
),
zip
(
node
.
outputs
,
new_outputs
),
[
old_dot22
],
[
old_dot22
],
reason
=
'GemmOptimizer'
,
reason
=
'GemmOptimizer'
,
warn
=
not
self
.
warned
#For now we disable the warning as we know case
#that we need to fix.
warn
=
False
,
# warn=not self.warned
)
)
did_something
=
True
did_something
=
True
nb_replacement
+=
1
nb_replacement
+=
1
...
...
theano/tensor/tests/test_elemwise.py
浏览文件 @
a81fbe8a
...
@@ -618,6 +618,13 @@ class T_sum_dtype(unittest.TestCase):
...
@@ -618,6 +618,13 @@ class T_sum_dtype(unittest.TestCase):
for
input_dtype
in
imap
(
str
,
theano
.
scalar
.
all_types
):
for
input_dtype
in
imap
(
str
,
theano
.
scalar
.
all_types
):
x
=
tensor
.
matrix
(
dtype
=
input_dtype
)
x
=
tensor
.
matrix
(
dtype
=
input_dtype
)
for
output_dtype
in
imap
(
str
,
theano
.
scalar
.
all_types
):
for
output_dtype
in
imap
(
str
,
theano
.
scalar
.
all_types
):
# If the output is a complex, the gradient of the sum will
# cast the complex to the input dtype. We can't call the normal
# cast on a complex to a not complex as this is ambiguous.
if
(
not
input_dtype
.
startswith
(
'complex'
)
and
output_dtype
.
startswith
(
'complex'
)):
continue
axis
=
axes
[
idx
%
len
(
axes
)]
axis
=
axes
[
idx
%
len
(
axes
)]
# If output_dtype would force a downcast, we expect a TypeError
# If output_dtype would force a downcast, we expect a TypeError
# We always allow int/uint inputs with float/complex outputs.
# We always allow int/uint inputs with float/complex outputs.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论