提交 9c6b0886 authored 作者: carriepl's avatar carriepl

Implement Rop, grad and conn_pattern for AllocEmpty

上级 662ea98e
...@@ -6093,3 +6093,12 @@ class AllocEmpty(gof.Op): ...@@ -6093,3 +6093,12 @@ class AllocEmpty(gof.Op):
def do_constant_folding(self, node): def do_constant_folding(self, node):
return False return False
def connection_pattern(self, node):
return [[False] for i in node.inputs]
def grad(self, inputs, grads):
return [DisconnectedType()() for i in inputs]
def R_op(self, inputs, eval_points):
return [zeros(inputs, self.dtype)]
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论