MCPcopy Create free account
hub / github.com/apache/singa / Rounde

Class Rounde

python/singa/autograd.py:5620–5634  ·  view source on GitHub ↗

Element-wise round the input, In case of halfs, round to the nearest even integer

Source from the content-addressed store, hash-verified

5618
5619
5620class Rounde(Operator):
5621 """
5622 Element-wise round the input, In case of halfs, round to the nearest even integer
5623 """
5624
5625 def __init__(self):
5626 super(Rounde, self).__init__()
5627
5628 def forward(self, x):
5629 return singa.RoundE(x)
5630
5631 def backward(self, dy):
5632 dy = singa.Tensor(dy.shape(), dy.device())
5633 dy.SetFloatValue(0.)
5634 return dy
5635
5636
5637def rounde(x):

Callers 1

roundeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected