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

Class Round

python/singa/autograd.py:5592–5606  ·  view source on GitHub ↗

Element-wise round the input

Source from the content-addressed store, hash-verified

5590
5591
5592class Round(Operator):
5593 """
5594 Element-wise round the input
5595 """
5596
5597 def __init__(self):
5598 super(Round, self).__init__()
5599
5600 def forward(self, x):
5601 return singa.Round(x)
5602
5603 def backward(self, dy):
5604 dy = singa.Tensor(dy.shape(), dy.device())
5605 dy.SetFloatValue(0.)
5606 return dy
5607
5608
5609def round(x):

Callers 1

roundFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected