Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
47ea0388
提交
47ea0388
authored
8月 10, 2015
作者:
Iban Harlouchet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
numpydoc for theano/sandbox/test_rng_mrg.py
上级
8befdc6c
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
30 行增加
和
15 行删除
+30
-15
test_rng_mrg.py
theano/sandbox/test_rng_mrg.py
+30
-15
没有找到文件。
theano/sandbox/test_rng_mrg.py
浏览文件 @
47ea0388
...
...
@@ -75,10 +75,11 @@ def test_deterministic():
def
test_consistency_randomstreams
():
'''Verify that the random numbers generated by MRG_RandomStreams
"""
Verify that the random numbers generated by MRG_RandomStreams
are the same as the reference (Java) implementation by L'Ecuyer et al.
'''
"""
seed
=
12345
n_samples
=
5
n_streams
=
12
...
...
@@ -108,9 +109,11 @@ def test_consistency_randomstreams():
def
test_consistency_cpu_serial
():
'''Verify that the random numbers generated by mrg_uniform, serially,
"""
Verify that the random numbers generated by mrg_uniform, serially,
are the same as the reference (Java) implementation by L'Ecuyer et al.
'''
"""
seed
=
12345
n_samples
=
5
n_streams
=
12
...
...
@@ -149,9 +152,11 @@ def test_consistency_cpu_serial():
def
test_consistency_cpu_parallel
():
'''Verify that the random numbers generated by mrg_uniform, in parallel,
"""
Verify that the random numbers generated by mrg_uniform, in parallel,
are the same as the reference (Java) implementation by L'Ecuyer et al.
'''
"""
seed
=
12345
n_samples
=
5
n_streams
=
12
...
...
@@ -193,9 +198,11 @@ def test_consistency_cpu_parallel():
def
test_consistency_GPU_serial
():
'''Verify that the random numbers generated by GPU_mrg_uniform, serially,
"""
Verify that the random numbers generated by GPU_mrg_uniform, serially,
are the same as the reference (Java) implementation by L'Ecuyer et al.
'''
"""
if
not
cuda_available
:
raise
SkipTest
(
'Optional package cuda not available'
)
if
config
.
mode
==
'FAST_COMPILE'
:
...
...
@@ -250,11 +257,12 @@ def test_consistency_GPU_serial():
def
test_consistency_GPU_parallel
():
'''Verify that the random numbers generated by GPU_mrg_uniform, in
"""
Verify that the random numbers generated by GPU_mrg_uniform, in
parallel, are the same as the reference (Java) implementation by
L'Ecuyer et al.
'''
"""
if
not
cuda_available
:
raise
SkipTest
(
'Optional package cuda not available'
)
if
config
.
mode
==
'FAST_COMPILE'
:
...
...
@@ -310,9 +318,11 @@ def test_consistency_GPU_parallel():
def
test_GPU_nstreams_limit
():
"""Verify that a ValueError is raised when n_streams
"""
Verify that a ValueError is raised when n_streams
is greater than 2**20 on GPU. This is the value of
(NUM_VECTOR_OP_THREADS_PER_BLOCK * NUM_VECTOR_OP_BLOCKS).
"""
if
not
cuda_available
:
raise
SkipTest
(
'Optional package cuda not available'
)
...
...
@@ -335,9 +345,11 @@ def test_GPU_nstreams_limit():
def
test_consistency_GPUA_serial
():
'''Verify that the random numbers generated by GPUA_mrg_uniform, serially,
"""
Verify that the random numbers generated by GPUA_mrg_uniform, serially,
are the same as the reference (Java) implementation by L'Ecuyer et al.
'''
"""
from
theano.sandbox.gpuarray.tests.test_basic_ops
import
\
mode_with_gpu
as
mode
from
theano.sandbox.gpuarray.type
import
gpuarray_shared_constructor
...
...
@@ -387,11 +399,12 @@ def test_consistency_GPUA_serial():
def
test_consistency_GPUA_parallel
():
'''Verify that the random numbers generated by GPUA_mrg_uniform, in
"""
Verify that the random numbers generated by GPUA_mrg_uniform, in
parallel, are the same as the reference (Java) implementation by
L'Ecuyer et al.
'''
"""
from
theano.sandbox.gpuarray.tests.test_basic_ops
import
\
mode_with_gpu
as
mode
from
theano.sandbox.gpuarray.type
import
gpuarray_shared_constructor
...
...
@@ -855,6 +868,7 @@ def test_multiple_rng_aliasing():
copy the (random) state between two similar theano graphs. The test is
meant to detect a previous bug where state_updates was initialized as a
class-attribute, instead of the __init__ function.
"""
rng1
=
MRG_RandomStreams
(
1234
)
rng2
=
MRG_RandomStreams
(
2392
)
...
...
@@ -864,6 +878,7 @@ def test_multiple_rng_aliasing():
def
test_random_state_transfer
():
"""
Test that random state can be transferred from one theano graph to another.
"""
class
Graph
:
def
__init__
(
self
,
seed
=
123
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论