提交 2e51a436 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Add infer_shape to the ops.

上级 57865538
...@@ -220,6 +220,9 @@ const npy_intp *oIdx ...@@ -220,6 +220,9 @@ const npy_intp *oIdx
outputBatchedG = to_cudandarray(outputBatched) outputBatchedG = to_cudandarray(outputBatched)
out[0] = o + outputBatchedG.reduce_sum([1, 0, 0]) out[0] = o + outputBatchedG.reduce_sum([1, 0, 0])
def infer_shape(self, node, input_shapes):
return [input_shapes[0]]
def c_code(self, node, nodename, inputs, outputs, sub): def c_code(self, node, nodename, inputs, outputs, sub):
o, W, h, inputIdx, outputIdx = inputs o, W, h, inputIdx, outputIdx = inputs
out = outputs[0] out = outputs[0]
...@@ -400,6 +403,9 @@ class SparseBlockOuterSS(GpuOp): ...@@ -400,6 +403,9 @@ class SparseBlockOuterSS(GpuOp):
out[0] = o out[0] = o
def infer_shape(self, node, input_shapes):
return [input_shapes[0]]
def c_support_code(self): def c_support_code(self):
return """ return """
__global__ void __global__ void
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论