Add an output to apply_proximal_adagrad op register

This commit is contained in:
yujianfeng 2020-06-23 11:54:51 +08:00
parent 35ab95bfae
commit 34407391e6
2 changed files with 2 additions and 1 deletions

View File

@ -48,6 +48,7 @@ MS_REG_CPU_KERNEL(SparseApplyProximalAdagrad,
.AddInputAttr(kNumberTypeFloat32)
.AddInputAttr(kNumberTypeFloat32)
.AddInputAttr(kNumberTypeInt32)
.AddOutputAttr(kNumberTypeFloat32)
.AddOutputAttr(kNumberTypeFloat32),
SparseApplyProximalAdagradCPUKernel);
} // namespace kernel

View File

@ -44,4 +44,4 @@ def test_net():
context.set_context(mode=context.GRAPH_MODE, device_target="CPU")
sparse_apply_proximal_adagrad = Net()
output = sparse_apply_proximal_adagrad(gradient, indices)
print(output.asnumpy()[0])
print(output[0].asnumpy())