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

Method backward

python/singa/autograd.py:2119–2133  ·  view source on GitHub ↗

Args: dy (CTensor): the gradient tensor from upper operations Returns: CTensor, the gradient over input

(self, dy)

Source from the content-addressed store, hash-verified

2117 return singa.Acosh(x)
2118
2119 def backward(self, dy):
2120 """
2121 Args:
2122 dy (CTensor): the gradient tensor from upper operations
2123 Returns:
2124 CTensor, the gradient over input
2125 """
2126 dx = singa.SubFloat(self.input, 1.0)
2127 dx = singa.Sqrt(dx)
2128 temp = singa.AddFloat(self.input, 1.0)
2129 temp = singa.Sqrt(temp)
2130 dx = singa.__mul__(dx, temp)
2131 dx = singa.PowFloat(dx, -1.0)
2132 dx *= dy
2133 return dx
2134
2135
2136def acosh(x):

Callers

nothing calls this directly

Calls 1

__mul__Method · 0.45

Tested by

no test coverage detected