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

Method forward

python/singa/autograd.py:3077–3095  ·  view source on GitHub ↗

Args: *x (a list of CTensor): List of tensors for max. Returns: CTensor, the output

(self, *x)

Source from the content-addressed store, hash-verified

3075 return res, (mask0, mask1)
3076
3077 def forward(self, *x):
3078 """
3079 Args:
3080 *x (a list of CTensor): List of tensors for max.
3081 Returns:
3082 CTensor, the output
3083 """
3084 assert (len(x) > 0)
3085 self.l = len(x)
3086 if len(x) == 1:
3087 res, masks = self._min(x[0], x[0])
3088 self.masks.append(masks)
3089 return x[0]
3090 res, masks = self._min(x[0], x[1])
3091 self.masks.append(masks)
3092 for i in range(2, len(x)):
3093 res, masks = self._min(res, x[i])
3094 self.masks.append(masks)
3095 return res
3096
3097 def backward(self, dy):
3098 """

Callers

nothing calls this directly

Calls 2

_minMethod · 0.95
appendMethod · 0.80

Tested by

no test coverage detected