Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
d140f1a4
提交
d140f1a4
authored
9月 22, 2017
作者:
Pascal Lamblin
提交者:
GitHub
9月 22, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6437 from abergeron/fix_buildbot
Fix problems found on buildbots
上级
1bb1bb8e
b932c79c
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
17 行增加
和
5 行删除
+17
-5
config.yml
.circleci/config.yml
+2
-2
test_d3viz.py
theano/d3viz/tests/test_d3viz.py
+2
-0
subtensor.py
theano/gpuarray/subtensor.py
+5
-1
blas.py
theano/tensor/blas.py
+2
-0
extra_ops.py
theano/tensor/extra_ops.py
+3
-2
test_printing.py
theano/tests/test_printing.py
+3
-0
没有找到文件。
.circleci/config.yml
浏览文件 @
d140f1a4
...
@@ -27,10 +27,10 @@ jobs:
...
@@ -27,10 +27,10 @@ jobs:
command
:
|
command
:
|
if [[ -n "${CIRCLE_TAG}" ]]
if [[ -n "${CIRCLE_TAG}" ]]
then
then
anaconda -t $BINSTAR_TOKEN upload --user=mila-udem /miniconda/conda-bld/
noarch
/theano*
anaconda -t $BINSTAR_TOKEN upload --user=mila-udem /miniconda/conda-bld/
linux-64
/theano*
fi
fi
-
store_artifacts
:
-
store_artifacts
:
path
:
/miniconda/conda-bld/linux-
x
64
path
:
/miniconda/conda-bld/linux-64
workflows
:
workflows
:
version
:
2
version
:
2
...
...
theano/d3viz/tests/test_d3viz.py
浏览文件 @
d140f1a4
...
@@ -38,6 +38,8 @@ class TestD3Viz(unittest.TestCase):
...
@@ -38,6 +38,8 @@ class TestD3Viz(unittest.TestCase):
self
.
check
(
f
)
self
.
check
(
f
)
def
test_mlp_profiled
(
self
):
def
test_mlp_profiled
(
self
):
if
th
.
config
.
mode
in
(
"DebugMode"
,
"DEBUG_MODE"
):
raise
SkipTest
(
"Can't profile in DebugMode"
)
m
=
models
.
Mlp
()
m
=
models
.
Mlp
()
profile
=
th
.
compile
.
profiling
.
ProfileStats
(
False
)
profile
=
th
.
compile
.
profiling
.
ProfileStats
(
False
)
f
=
th
.
function
(
m
.
inputs
,
m
.
outputs
,
profile
=
profile
)
f
=
th
.
function
(
m
.
inputs
,
m
.
outputs
,
profile
=
profile
)
...
...
theano/gpuarray/subtensor.py
浏览文件 @
d140f1a4
...
@@ -1111,6 +1111,10 @@ if (GpuArray_vector_add_fast(%(out)s, %(y)s, %(ind)s, %(params)s->set_instead_of
...
@@ -1111,6 +1111,10 @@ if (GpuArray_vector_add_fast(%(out)s, %(y)s, %(ind)s, %(params)s->set_instead_of
"""
%
dict
(
x
=
inputs
[
0
],
y
=
inputs
[
1
],
ind
=
inputs
[
2
],
out
=
outputs
[
0
],
fail
=
sub
[
'fail'
],
params
=
sub
[
'params'
])
"""
%
dict
(
x
=
inputs
[
0
],
y
=
inputs
[
1
],
ind
=
inputs
[
2
],
out
=
outputs
[
0
],
fail
=
sub
[
'fail'
],
params
=
sub
[
'params'
])
def
gpu_kernels
(
self
,
node
,
nodename
):
def
gpu_kernels
(
self
,
node
,
nodename
):
# We can't rely on numpy for this, it changes with the OS
CHARMAP
=
dict
(
int32
=
'i'
,
uint32
=
'I'
,
int64
=
'l'
,
uint64
=
'L'
,
float16
=
'e'
,
float32
=
'f'
,
float64
=
'd'
)
dtype_x
=
node
.
inputs
[
0
]
.
dtype
dtype_x
=
node
.
inputs
[
0
]
.
dtype
dtype_y
=
node
.
inputs
[
1
]
.
dtype
dtype_y
=
node
.
inputs
[
1
]
.
dtype
dtype_ind
=
node
.
inputs
[
2
]
.
dtype
dtype_ind
=
node
.
inputs
[
2
]
.
dtype
...
@@ -1168,7 +1172,7 @@ if (GpuArray_vector_add_fast(%(out)s, %(y)s, %(ind)s, %(params)s->set_instead_of
...
@@ -1168,7 +1172,7 @@ if (GpuArray_vector_add_fast(%(out)s, %(y)s, %(ind)s, %(params)s->set_instead_of
return;
return;
}
}
"""
%
dict
(
type_x
=
type_x
,
type_y
=
type_y
,
type_ind
=
type_ind
,
"""
%
dict
(
type_x
=
type_x
,
type_y
=
type_y
,
type_ind
=
type_ind
,
tc
=
np
.
dtype
(
dtype_x
)
.
char
)
tc
=
CHARMAP
[
dtype_x
]
)
from
pygpu.gpuarray
import
SIZE
,
SSIZE
from
pygpu.gpuarray
import
SIZE
,
SSIZE
params
=
[
params
=
[
SIZE
,
SIZE
,
SSIZE
,
SSIZE
,
gpuarray
.
GpuArray
,
SIZE
,
SIZE
,
SIZE
,
SSIZE
,
SSIZE
,
gpuarray
.
GpuArray
,
SIZE
,
...
...
theano/tensor/blas.py
浏览文件 @
d140f1a4
...
@@ -1532,6 +1532,8 @@ class Dot22(GemmRelated):
...
@@ -1532,6 +1532,8 @@ class Dot22(GemmRelated):
check_input
=
False
check_input
=
False
def
make_node
(
self
,
x
,
y
):
def
make_node
(
self
,
x
,
y
):
x
=
T
.
as_tensor_variable
(
x
)
y
=
T
.
as_tensor_variable
(
y
)
dtypes
=
(
'float16'
,
'float32'
,
'float64'
,
'complex64'
,
'complex128'
)
dtypes
=
(
'float16'
,
'float32'
,
'float64'
,
'complex64'
,
'complex128'
)
if
x
.
type
.
ndim
!=
2
or
x
.
type
.
dtype
not
in
dtypes
:
if
x
.
type
.
ndim
!=
2
or
x
.
type
.
dtype
not
in
dtypes
:
raise
TypeError
(
x
)
raise
TypeError
(
x
)
...
...
theano/tensor/extra_ops.py
浏览文件 @
d140f1a4
...
@@ -1218,7 +1218,7 @@ class UnravelIndex(gof.Op):
...
@@ -1218,7 +1218,7 @@ class UnravelIndex(gof.Op):
res
=
np
.
unravel_index
(
indices
,
dims
)
res
=
np
.
unravel_index
(
indices
,
dims
)
assert
len
(
res
)
==
len
(
out
)
assert
len
(
res
)
==
len
(
out
)
for
i
in
xrange
(
len
(
out
)):
for
i
in
xrange
(
len
(
out
)):
out
[
i
][
0
]
=
res
[
i
]
out
[
i
][
0
]
=
theano
.
_asarray
(
res
[
i
],
node
.
outputs
[
0
]
.
dtype
)
def
unravel_index
(
indices
,
dims
,
order
=
'C'
,
ndim
=
None
):
def
unravel_index
(
indices
,
dims
,
order
=
'C'
,
ndim
=
None
):
...
@@ -1304,8 +1304,9 @@ class RavelMultiIndex(gof.Op):
...
@@ -1304,8 +1304,9 @@ class RavelMultiIndex(gof.Op):
def
perform
(
self
,
node
,
inp
,
out
):
def
perform
(
self
,
node
,
inp
,
out
):
multi_index
,
dims
=
inp
[:
-
1
],
inp
[
-
1
]
multi_index
,
dims
=
inp
[:
-
1
],
inp
[
-
1
]
out
[
0
][
0
]
=
np
.
ravel_multi_index
(
multi_index
,
dims
,
res
=
np
.
ravel_multi_index
(
multi_index
,
dims
,
mode
=
self
.
mode
,
order
=
self
.
order
)
mode
=
self
.
mode
,
order
=
self
.
order
)
out
[
0
][
0
]
=
theano
.
_asarray
(
res
,
node
.
outputs
[
0
]
.
dtype
)
def
ravel_multi_index
(
multi_index
,
dims
,
mode
=
'raise'
,
order
=
'C'
):
def
ravel_multi_index
(
multi_index
,
dims
,
mode
=
'raise'
,
order
=
'C'
):
...
...
theano/tests/test_printing.py
浏览文件 @
d140f1a4
...
@@ -84,6 +84,9 @@ def test_pydotprint_profile():
...
@@ -84,6 +84,9 @@ def test_pydotprint_profile():
if
not
theano
.
printing
.
pydot_imported
:
if
not
theano
.
printing
.
pydot_imported
:
raise
SkipTest
(
'pydot not available'
)
raise
SkipTest
(
'pydot not available'
)
if
theano
.
config
.
mode
in
(
"DebugMode"
,
"DEBUG_MODE"
):
raise
SkipTest
(
"Can't profile in DebugMode"
)
A
=
tensor
.
matrix
()
A
=
tensor
.
matrix
()
prof
=
theano
.
compile
.
ProfileStats
(
atexit_print
=
False
,
gpu_checks
=
False
)
prof
=
theano
.
compile
.
ProfileStats
(
atexit_print
=
False
,
gpu_checks
=
False
)
f
=
theano
.
function
([
A
],
A
+
1
,
profile
=
prof
)
f
=
theano
.
function
([
A
],
A
+
1
,
profile
=
prof
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论