提交 36683819 authored 作者: Dumitru Erhan's avatar Dumitru Erhan

bugfix: shape_out is now computed correctly for matrix-vector multiplies

上级 0c74eac2
......@@ -189,7 +189,7 @@ def local_gpu_dot_to_dot22(node):
# case two: matrix X vector
elif _is_real_matrix(x) and _is_real_vector(y):
new_op = GpuDimShuffle((False,), [0,'x'])
shape_out = x.shape[1].dimshuffle(['x'])
shape_out = x.shape[0].dimshuffle(['x'])
gpu_x = gpu_from_host(x)
gpu_y = new_op(gpu_from_host(y))
else:
......@@ -207,7 +207,7 @@ def local_gpu_dot_to_dot22(node):
elif _is_real_matrix(x) and _is_real_vector(y):
new_op = GpuDimShuffle((False,), [0,'x'])
shape_out = x.shape[1].dimshuffle(['x'])
shape_out = x.shape[0].dimshuffle(['x'])
gpu_x = gpu_from_host(x)
gpu_y = new_op(gpu_from_host(y))
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论