Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
3fad40aa
提交
3fad40aa
authored
5月 17, 2017
作者:
Pascal Lamblin
提交者:
GitHub
5月 17, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5948 from nouiz/jenkins_tests
Fix jenkins tests
上级
a6f9131b
9b337b6a
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
29 行增加
和
23 行删除
+29
-23
jenkins_buildbot_python2.sh
.jenkins/jenkins_buildbot_python2.sh
+3
-2
test_dnn.py
theano/gpuarray/tests/test_dnn.py
+5
-4
test_fft.py
theano/gpuarray/tests/test_fft.py
+11
-11
test_gemmcorr.py
theano/gpuarray/tests/test_gemmcorr.py
+1
-1
test_gemmcorr3d.py
theano/gpuarray/tests/test_gemmcorr3d.py
+1
-1
test_rng_mrg.py
theano/gpuarray/tests/test_rng_mrg.py
+1
-1
test_scan.py
theano/scan_module/tests/test_scan.py
+1
-1
test_scan_checkpoints.py
theano/scan_module/tests/test_scan_checkpoints.py
+6
-2
没有找到文件。
.jenkins/jenkins_buildbot_python2.sh
浏览文件 @
3fad40aa
...
@@ -115,12 +115,13 @@ echo
...
@@ -115,12 +115,13 @@ echo
#We put this at the end as it have a tendency to loop infinitly.
#We put this at the end as it have a tendency to loop infinitly.
#Until we fix the root of the problem we let the rest run, then we can kill this one in the morning.
#Until we fix the root of the problem we let the rest run, then we can kill this one in the morning.
# with --batch=1000" # The buildbot freeze sometimes when collecting the tests to run
# with --batch=1000" # The buildbot freeze sometimes when collecting the tests to run
# force_device=True as it would be useless to test the gpuarray back-end.
echo
"Executing tests with mode=FAST_COMPILE"
echo
"Executing tests with mode=FAST_COMPILE"
NAME
=
fastcompile
NAME
=
fastcompile
FILE
=
${
ROOT_CWD
}
/theano_
${
NAME
}
_tests.xml
FILE
=
${
ROOT_CWD
}
/theano_
${
NAME
}
_tests.xml
echo
"THEANO_FLAGS=
${
FLAGS
}
,mode=FAST_COMPILE
${
NOSETESTS
}
${
THEANO_PARAM
}
${
XUNIT
}${
FILE
}
${
SUITE
}${
NAME
}
"
echo
"THEANO_FLAGS=
${
FLAGS
}
,mode=FAST_COMPILE
,force_device=True
${
NOSETESTS
}
${
THEANO_PARAM
}
${
XUNIT
}${
FILE
}
${
SUITE
}${
NAME
}
"
date
date
THEANO_FLAGS
=
${
FLAGS
}
,mode
=
FAST_COMPILE
${
NOSETESTS
}
${
THEANO_PARAM
}
${
XUNIT
}${
FILE
}
${
SUITE
}${
NAME
}
THEANO_FLAGS
=
${
FLAGS
}
,mode
=
FAST_COMPILE
,force_device
=
True
${
NOSETESTS
}
${
THEANO_PARAM
}
${
XUNIT
}${
FILE
}
${
SUITE
}${
NAME
}
echo
"Number of elements in the compiledir:"
echo
"Number of elements in the compiledir:"
ls
${
COMPILEDIR
}
|wc
-l
ls
${
COMPILEDIR
}
|wc
-l
...
...
theano/gpuarray/tests/test_dnn.py
浏览文件 @
3fad40aa
...
@@ -52,7 +52,8 @@ def test_dnn_conv_desc_merge():
...
@@ -52,7 +52,8 @@ def test_dnn_conv_desc_merge():
# CDataType is not DeepCopyable so this will crash if we don't use
# CDataType is not DeepCopyable so this will crash if we don't use
# borrow=True
# borrow=True
f
=
theano
.
function
([],
[
theano
.
Out
(
desc1
,
borrow
=
True
),
f
=
theano
.
function
([],
[
theano
.
Out
(
desc1
,
borrow
=
True
),
theano
.
Out
(
desc2
,
borrow
=
True
)])
theano
.
Out
(
desc2
,
borrow
=
True
)],
mode
=
mode_with_gpu
)
d1
,
d2
=
f
()
d1
,
d2
=
f
()
...
@@ -997,9 +998,9 @@ def test_dnn_conv_grad():
...
@@ -997,9 +998,9 @@ def test_dnn_conv_grad():
return
dnn
.
GpuDnnConvGradW
()(
img
,
out
,
kern
,
desc
,
alpha
=
0.75
,
return
dnn
.
GpuDnnConvGradW
()(
img
,
out
,
kern
,
desc
,
alpha
=
0.75
,
beta
=-
1.0
)
beta
=-
1.0
)
utt
.
verify_grad
(
dconv
,
[
img_val
,
kern_val
,
out_val
],
eps
=
1e-3
)
utt
.
verify_grad
(
dconv
,
[
img_val
,
kern_val
,
out_val
],
eps
=
1e-3
,
mode
=
mode_with_gpu
)
utt
.
verify_grad
(
dconvi
,
[
img_val
,
kern_val
,
out_val
],
eps
=
1e-3
)
utt
.
verify_grad
(
dconvi
,
[
img_val
,
kern_val
,
out_val
],
eps
=
1e-3
,
mode
=
mode_with_gpu
)
utt
.
verify_grad
(
dconvw
,
[
img_val
,
kern_val
,
out_val
],
eps
=
1e-3
)
utt
.
verify_grad
(
dconvw
,
[
img_val
,
kern_val
,
out_val
],
eps
=
1e-3
,
mode
=
mode_with_gpu
)
def
get_conv3d_test_cases
():
def
get_conv3d_test_cases
():
...
...
theano/gpuarray/tests/test_fft.py
浏览文件 @
3fad40aa
...
@@ -54,12 +54,12 @@ class TestFFT(unittest.TestCase):
...
@@ -54,12 +54,12 @@ class TestFFT(unittest.TestCase):
def
f_rfft
(
inp
):
def
f_rfft
(
inp
):
return
theano
.
gpuarray
.
fft
.
curfft
(
inp
)
return
theano
.
gpuarray
.
fft
.
curfft
(
inp
)
inputs_val
=
np
.
random
.
random
((
1
,
N
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
N
))
.
astype
(
'float32'
)
utt
.
verify_grad
(
f_rfft
,
[
inputs_val
],
eps
=
eps
)
utt
.
verify_grad
(
f_rfft
,
[
inputs_val
],
eps
=
eps
,
mode
=
mode_with_gpu
)
def
f_irfft
(
inp
):
def
f_irfft
(
inp
):
return
theano
.
gpuarray
.
fft
.
cuirfft
(
inp
)
return
theano
.
gpuarray
.
fft
.
cuirfft
(
inp
)
inputs_val
=
np
.
random
.
random
((
1
,
N
//
2
+
1
,
2
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
N
//
2
+
1
,
2
))
.
astype
(
'float32'
)
utt
.
verify_grad
(
f_irfft
,
[
inputs_val
],
eps
=
eps
)
utt
.
verify_grad
(
f_irfft
,
[
inputs_val
],
eps
=
eps
,
mode
=
mode_with_gpu
)
def
test_rfft
(
self
):
def
test_rfft
(
self
):
inputs_val
=
np
.
random
.
random
((
1
,
N
,
N
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
N
,
N
))
.
astype
(
'float32'
)
...
@@ -94,7 +94,7 @@ class TestFFT(unittest.TestCase):
...
@@ -94,7 +94,7 @@ class TestFFT(unittest.TestCase):
inputs
=
theano
.
shared
(
inputs_val
)
inputs
=
theano
.
shared
(
inputs_val
)
irfft
=
theano
.
gpuarray
.
fft
.
cuirfft
(
inputs
)
irfft
=
theano
.
gpuarray
.
fft
.
cuirfft
(
inputs
)
f_irfft
=
theano
.
function
([],
irfft
)
f_irfft
=
theano
.
function
([],
irfft
,
mode
=
mode_with_gpu
)
res_irfft
=
f_irfft
()
res_irfft
=
f_irfft
()
inputs_ref
=
inputs_val
[
...
,
0
]
+
inputs_val
[
...
,
1
]
*
1
j
inputs_ref
=
inputs_val
[
...
,
0
]
+
inputs_val
[
...
,
1
]
*
1
j
...
@@ -164,22 +164,22 @@ class TestFFT(unittest.TestCase):
...
@@ -164,22 +164,22 @@ class TestFFT(unittest.TestCase):
def
f_rfft
(
inp
):
def
f_rfft
(
inp
):
return
theano
.
gpuarray
.
fft
.
curfft
(
inp
)
return
theano
.
gpuarray
.
fft
.
curfft
(
inp
)
inputs_val
=
np
.
random
.
random
((
1
,
N
,
N
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
N
,
N
))
.
astype
(
'float32'
)
utt
.
verify_grad
(
f_rfft
,
[
inputs_val
],
eps
=
eps
)
utt
.
verify_grad
(
f_rfft
,
[
inputs_val
],
eps
=
eps
,
mode
=
mode_with_gpu
)
def
f_irfft
(
inp
):
def
f_irfft
(
inp
):
return
theano
.
gpuarray
.
fft
.
cuirfft
(
inp
)
return
theano
.
gpuarray
.
fft
.
cuirfft
(
inp
)
inputs_val
=
np
.
random
.
random
((
1
,
N
,
N
//
2
+
1
,
2
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
N
,
N
//
2
+
1
,
2
))
.
astype
(
'float32'
)
utt
.
verify_grad
(
f_irfft
,
[
inputs_val
],
eps
=
eps
)
utt
.
verify_grad
(
f_irfft
,
[
inputs_val
],
eps
=
eps
,
mode
=
mode_with_gpu
)
def
f_rfft
(
inp
):
def
f_rfft
(
inp
):
return
theano
.
gpuarray
.
fft
.
curfft
(
inp
,
norm
=
'ortho'
)
return
theano
.
gpuarray
.
fft
.
curfft
(
inp
,
norm
=
'ortho'
)
inputs_val
=
np
.
random
.
random
((
1
,
N
,
N
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
N
,
N
))
.
astype
(
'float32'
)
utt
.
verify_grad
(
f_rfft
,
[
inputs_val
],
eps
=
eps
)
utt
.
verify_grad
(
f_rfft
,
[
inputs_val
],
eps
=
eps
,
mode
=
mode_with_gpu
)
def
f_irfft
(
inp
):
def
f_irfft
(
inp
):
return
theano
.
gpuarray
.
fft
.
cuirfft
(
inp
,
norm
=
'no_norm'
)
return
theano
.
gpuarray
.
fft
.
cuirfft
(
inp
,
norm
=
'no_norm'
)
inputs_val
=
np
.
random
.
random
((
1
,
N
,
N
//
2
+
1
,
2
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
N
,
N
//
2
+
1
,
2
))
.
astype
(
'float32'
)
utt
.
verify_grad
(
f_irfft
,
[
inputs_val
],
eps
=
eps
)
utt
.
verify_grad
(
f_irfft
,
[
inputs_val
],
eps
=
eps
,
mode
=
mode_with_gpu
)
def
test_odd
(
self
):
def
test_odd
(
self
):
M
=
N
-
1
M
=
N
-
1
...
@@ -224,22 +224,22 @@ class TestFFT(unittest.TestCase):
...
@@ -224,22 +224,22 @@ class TestFFT(unittest.TestCase):
def
f_rfft
(
inp
):
def
f_rfft
(
inp
):
return
theano
.
gpuarray
.
fft
.
curfft
(
inp
)
return
theano
.
gpuarray
.
fft
.
curfft
(
inp
)
inputs_val
=
np
.
random
.
random
((
1
,
M
,
M
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
M
,
M
))
.
astype
(
'float32'
)
utt
.
verify_grad
(
f_rfft
,
[
inputs_val
],
eps
=
eps
)
utt
.
verify_grad
(
f_rfft
,
[
inputs_val
],
eps
=
eps
,
mode
=
mode_with_gpu
)
def
f_irfft
(
inp
):
def
f_irfft
(
inp
):
return
theano
.
gpuarray
.
fft
.
cuirfft
(
inp
,
is_odd
=
True
)
return
theano
.
gpuarray
.
fft
.
cuirfft
(
inp
,
is_odd
=
True
)
inputs_val
=
np
.
random
.
random
((
1
,
M
,
M
//
2
+
1
,
2
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
M
,
M
//
2
+
1
,
2
))
.
astype
(
'float32'
)
utt
.
verify_grad
(
f_irfft
,
[
inputs_val
],
eps
=
eps
)
utt
.
verify_grad
(
f_irfft
,
[
inputs_val
],
eps
=
eps
,
mode
=
mode_with_gpu
)
def
f_rfft
(
inp
):
def
f_rfft
(
inp
):
return
theano
.
gpuarray
.
fft
.
curfft
(
inp
,
norm
=
'ortho'
)
return
theano
.
gpuarray
.
fft
.
curfft
(
inp
,
norm
=
'ortho'
)
inputs_val
=
np
.
random
.
random
((
1
,
M
,
M
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
M
,
M
))
.
astype
(
'float32'
)
utt
.
verify_grad
(
f_rfft
,
[
inputs_val
],
eps
=
eps
)
utt
.
verify_grad
(
f_rfft
,
[
inputs_val
],
eps
=
eps
,
mode
=
mode_with_gpu
)
def
f_irfft
(
inp
):
def
f_irfft
(
inp
):
return
theano
.
gpuarray
.
fft
.
cuirfft
(
inp
,
norm
=
'no_norm'
,
is_odd
=
True
)
return
theano
.
gpuarray
.
fft
.
cuirfft
(
inp
,
norm
=
'no_norm'
,
is_odd
=
True
)
inputs_val
=
np
.
random
.
random
((
1
,
M
,
M
//
2
+
1
,
2
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
M
,
M
//
2
+
1
,
2
))
.
astype
(
'float32'
)
utt
.
verify_grad
(
f_irfft
,
[
inputs_val
],
eps
=
eps
)
utt
.
verify_grad
(
f_irfft
,
[
inputs_val
],
eps
=
eps
,
mode
=
mode_with_gpu
)
def
test_params
(
self
):
def
test_params
(
self
):
inputs_val
=
np
.
random
.
random
((
1
,
N
))
.
astype
(
'float32'
)
inputs_val
=
np
.
random
.
random
((
1
,
N
))
.
astype
(
'float32'
)
...
...
theano/gpuarray/tests/test_gemmcorr.py
浏览文件 @
3fad40aa
...
@@ -48,7 +48,7 @@ class TestCorrMM(unittest.TestCase):
...
@@ -48,7 +48,7 @@ class TestCorrMM(unittest.TestCase):
utt
.
verify_grad
(
GpuCorrMM
(
border_mode
=
border_mode
,
utt
.
verify_grad
(
GpuCorrMM
(
border_mode
=
border_mode
,
filter_dilation
=
filter_dilation
,
filter_dilation
=
filter_dilation
,
subsample
=
subsample
),
subsample
=
subsample
),
[
inputs_val
,
filters_val
])
[
inputs_val
,
filters_val
]
,
mode
=
mode_with_gpu
)
def
test_valid
(
self
):
def
test_valid
(
self
):
self
.
run_conv_valid
(
inputs_shape
=
(
16
,
20
,
12
,
1
),
self
.
run_conv_valid
(
inputs_shape
=
(
16
,
20
,
12
,
1
),
...
...
theano/gpuarray/tests/test_gemmcorr3d.py
浏览文件 @
3fad40aa
...
@@ -47,7 +47,7 @@ class TestCorr3dMM(unittest.TestCase):
...
@@ -47,7 +47,7 @@ class TestCorr3dMM(unittest.TestCase):
utt
.
verify_grad
(
GpuCorr3dMM
(
border_mode
=
border_mode
,
utt
.
verify_grad
(
GpuCorr3dMM
(
border_mode
=
border_mode
,
filter_dilation
=
filter_dilation
,
filter_dilation
=
filter_dilation
,
subsample
=
subsample
),
subsample
=
subsample
),
[
inputs_val
,
filters_val
])
[
inputs_val
,
filters_val
]
,
mode
=
mode_with_gpu
)
def
test_valid
(
self
):
def
test_valid
(
self
):
self
.
run_conv_valid
(
inputs_shape
=
(
16
,
20
,
12
,
16
,
1
),
self
.
run_conv_valid
(
inputs_shape
=
(
16
,
20
,
12
,
16
,
1
),
...
...
theano/gpuarray/tests/test_rng_mrg.py
浏览文件 @
3fad40aa
...
@@ -129,7 +129,7 @@ def test_GPUA_full_fill():
...
@@ -129,7 +129,7 @@ def test_GPUA_full_fill():
dtype
=
'float32'
,
dtype
=
'float32'
,
size
=
size
)
size
=
size
)
rstate_gpu
.
default_update
=
new_rstate
rstate_gpu
.
default_update
=
new_rstate
f_gpu
=
theano
.
function
([],
sample
)
f_gpu
=
theano
.
function
([],
sample
,
mode
=
mode
)
utt
.
assert_allclose
(
f_cpu
(),
f_gpu
())
utt
.
assert_allclose
(
f_cpu
(),
f_gpu
())
...
...
theano/scan_module/tests/test_scan.py
浏览文件 @
3fad40aa
...
@@ -3047,7 +3047,7 @@ class T_Scan(unittest.TestCase):
...
@@ -3047,7 +3047,7 @@ class T_Scan(unittest.TestCase):
tnu
,
tnh0
,
tnW
,
tno
=
fn_test
(
v_u
,
v_h0
,
v_W
,
v_eu
,
v_eh0
,
v_eW
)
tnu
,
tnh0
,
tnW
,
tno
=
fn_test
(
v_u
,
v_h0
,
v_W
,
v_eu
,
v_eh0
,
v_eW
)
utt
.
assert_allclose
(
vnu
,
tnu
,
atol
=
1e-6
)
utt
.
assert_allclose
(
vnu
,
tnu
,
atol
=
1e-6
)
utt
.
assert_allclose
(
vnh0
,
tnh0
,
atol
=
1e-6
)
utt
.
assert_allclose
(
vnh0
,
tnh0
,
atol
=
1e-6
)
utt
.
assert_allclose
(
vnW
,
tnW
,
atol
=
1
e-6
)
utt
.
assert_allclose
(
vnW
,
tnW
,
atol
=
2
e-6
)
def
test_rop
(
self
):
def
test_rop
(
self
):
seed
=
utt
.
fetch_seed
()
seed
=
utt
.
fetch_seed
()
...
...
theano/scan_module/tests/test_scan_checkpoints.py
浏览文件 @
3fad40aa
...
@@ -57,11 +57,15 @@ class TestScanCheckpoint(unittest.TestCase):
...
@@ -57,11 +57,15 @@ class TestScanCheckpoint(unittest.TestCase):
f
=
theano
.
function
(
inputs
=
[
self
.
A
,
self
.
k
],
f
=
theano
.
function
(
inputs
=
[
self
.
A
,
self
.
k
],
outputs
=
self
.
grad_A
,
mode
=
mode_with_gpu
)
outputs
=
self
.
grad_A
,
mode
=
mode_with_gpu
)
f_check
=
theano
.
function
(
inputs
=
[
self
.
A
,
self
.
k
],
f_check
=
theano
.
function
(
inputs
=
[
self
.
A
,
self
.
k
],
outputs
=
self
.
grad_A_check
,
mode
=
mode_with_gpu
)
outputs
=
self
.
grad_A_check
,
mode
=
mode_with_gpu
)
free_gmem
=
theano
.
gpuarray
.
type
.
_context_reg
[
None
]
.
free_gmem
free_gmem
=
theano
.
gpuarray
.
type
.
_context_reg
[
None
]
.
free_gmem
data
=
np
.
ones
(
free_gmem
//
3000
,
dtype
=
np
.
float32
)
data
=
np
.
ones
(
free_gmem
//
3000
,
dtype
=
np
.
float32
)
# Check that it works with the checkpoints
# Check that it works with the checkpoints
f_check
(
data
,
1000
)
size
=
1000
if
isinstance
(
mode_with_gpu
,
theano
.
compile
.
DebugMode
):
size
=
100
f_check
(
data
,
size
)
# Check that the basic scan fails in that case
# Check that the basic scan fails in that case
# Skip that check in DebugMode, as it can fail in different ways
# Skip that check in DebugMode, as it can fail in different ways
if
not
isinstance
(
mode_with_gpu
,
theano
.
compile
.
DebugMode
):
if
not
isinstance
(
mode_with_gpu
,
theano
.
compile
.
DebugMode
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论