提交 ef327f2f authored 作者: Ian Goodfellow's avatar Ian Goodfellow

add grad method to gpu_contiguous

上级 268cf9cd
...@@ -2803,6 +2803,13 @@ class GpuContiguous(GpuOp): ...@@ -2803,6 +2803,13 @@ class GpuContiguous(GpuOp):
def __hash__(self): def __hash__(self):
return hash(type(self)) return hash(type(self))
def grad(self, inputs, dout):
x, = inputs
dout, = dout
return [dout]
def __str__(self): def __str__(self):
return self.__class__.__name__ return self.__class__.__name__
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论