提交 47021839 authored 作者: abergeron's avatar abergeron

Merge pull request #2512 from nouiz/cleanup

Crash fix and simpler graph
...@@ -1777,6 +1777,7 @@ class GCC_compiler(object): ...@@ -1777,6 +1777,7 @@ class GCC_compiler(object):
flags = list(flags) flags = list(flags)
compilation_ok = True compilation_ok = True
run_ok = False run_ok = False
out, err = None, None
try: try:
fd, path = tempfile.mkstemp(suffix='.c', prefix=tmp_prefix) fd, path = tempfile.mkstemp(suffix='.c', prefix=tmp_prefix)
exe_path = path[:-2] exe_path = path[:-2]
......
...@@ -21,7 +21,7 @@ if [ "$1" == "--buildbot" ]; then ...@@ -21,7 +21,7 @@ if [ "$1" == "--buildbot" ]; then
cd ${ROOT_CWD}/Theano cd ${ROOT_CWD}/Theano
git rev-parse HEAD git rev-parse HEAD
#Run tests from inside the Theano directory to prevent import problem. #Run tests from inside the Theano directory to prevent import problem.
PROFILING="--with-coverage --cover-package=theano" # PROFILING="--with-coverage --cover-package=theano"
NOSETESTS=${ROOT_CWD}/Theano/bin/theano-nose NOSETESTS=${ROOT_CWD}/Theano/bin/theano-nose
export PYTHONPATH=${ROOT_CWD}:$PYTHONPATH export PYTHONPATH=${ROOT_CWD}:$PYTHONPATH
else else
......
...@@ -314,7 +314,7 @@ def local_gpu_split(node): ...@@ -314,7 +314,7 @@ def local_gpu_split(node):
split_node = host_input.owner split_node = host_input.owner
new_op = GpuSplit(split_node.op.len_splits) new_op = GpuSplit(split_node.op.len_splits)
return [new_op(gpu_from_host(split_node.inputs[0]), return [new_op(gpu_from_host(split_node.inputs[0]),
*split_node.inputs[1:])[host_input.index]] *split_node.inputs[1:])]
return False return False
......
...@@ -43,6 +43,10 @@ def max_pool_2d(input, ds, ignore_border=False, st=None): ...@@ -43,6 +43,10 @@ def max_pool_2d(input, ds, ignore_border=False, st=None):
""" """
if input.ndim < 2: if input.ndim < 2:
raise NotImplementedError('max_pool_2d requires a dimension >= 2') raise NotImplementedError('max_pool_2d requires a dimension >= 2')
if input.ndim == 4:
op = DownsampleFactorMax(ds, ignore_border, st=st)
output = op(input)
return output
# extract image dimensions # extract image dimensions
img_shape = input.shape[-2:] img_shape = input.shape[-2:]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论