提交 50ba8815 authored 作者: f0k's avatar f0k

Removed unneeded gpu_contiguous in conv_gemm optimizer

上级 b058a149
...@@ -1391,10 +1391,10 @@ def local_conv_gemm(node): ...@@ -1391,10 +1391,10 @@ def local_conv_gemm(node):
prod2 *= node.op.imshp[0] prod2 *= node.op.imshp[0]
# compare to decide # compare to decide
if prod1 > prod2: if prod1 > prod2:
return [gpu_contiguous(GpuCorrMM_gradWeights('valid', subsample, pad)( return [GpuCorrMM_gradWeights('valid', subsample, pad)(
gpu_contiguous(img.dimshuffle(1, 0, 2, 3)), gpu_contiguous(img.dimshuffle(1, 0, 2, 3)),
gpu_contiguous(kern.dimshuffle(1, 0, 2, 3)) gpu_contiguous(kern.dimshuffle(1, 0, 2, 3))
).dimshuffle(1, 0, 2, 3))] ).dimshuffle(1, 0, 2, 3)]
# use GpuCorrMM if we did not choose GpuCorrMM_gradWeights above # use GpuCorrMM if we did not choose GpuCorrMM_gradWeights above
return [GpuCorrMM('valid', subsample, pad)( return [GpuCorrMM('valid', subsample, pad)(
gpu_contiguous(img), gpu_contiguous(kern))] gpu_contiguous(img), gpu_contiguous(kern))]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论