提交 ef1fa2fd authored 作者: Frederic Bastien's avatar Frederic Bastien

fix bug in ticket #596 related to tensor.concatenate of 1 element on the gpu.

上级 6bca8751
......@@ -584,6 +584,11 @@ def test_hostfromgpu_shape_i():
import theano.sandbox.cuda as cuda_ndarray
from theano.sandbox.cuda.basic_ops import gpu_join, GpuDimShuffle
def test_gpujoin_concatenate_one_element():
m = T.fmatrix()
c = T.concatenate([m])
f = theano.function(inputs=[m], outputs=[c], mode=mode_with_gpu)
def test_gpujoin_twomatrices_joincolumns():
_a = numpy.asarray([[1,2],[3,4]],dtype='float32')
_b = numpy.asarray([[5,6,7],[8,9,10]],dtype='float32')
......
......@@ -3173,7 +3173,7 @@ class Join(Op):
# broadcastable.
bcastable = [False] * len(as_tensor_variable_args[0].type.broadcastable)
inputs = [as_tensor_variable(axis)] + as_tensor_variable_args
inputs = [as_tensor_variable(axis)] + list(as_tensor_variable_args)
if inputs[0].type not in int_types:
raise TypeError('Axis could not be cast to an integer type', axis, inputs[0].type, int_types)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论