MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / apply

Method apply

tensorpack/models/linearwrap.py:68–76  ·  view source on GitHub ↗

Apply a function on the wrapped tensor. Returns: LinearWrap: ``LinearWrap(func(self.tensor(), *args, **kwargs))``.

(self, func, *args, **kwargs)

Source from the content-addressed store, hash-verified

66 return LinearWrap._TFModuleFunc(layer, self._t)
67
68 def apply(self, func, *args, **kwargs):
69 """
70 Apply a function on the wrapped tensor.
71
72 Returns:
73 LinearWrap: ``LinearWrap(func(self.tensor(), *args, **kwargs))``.
74 """
75 ret = func(self._t, *args, **kwargs)
76 return LinearWrap(ret)
77
78 def apply2(self, func, *args, **kwargs):
79 """

Callers 15

apply_imageMethod · 0.45
BatchNormFunction · 0.45
BatchRenormFunction · 0.45
MaxPoolingFunction · 0.45
AvgPoolingFunction · 0.45
Conv2DFunction · 0.45
Conv2DTransposeFunction · 0.45
FullyConnectedFunction · 0.45
gaFunction · 0.45
xaFunction · 0.45
yaFunction · 0.45

Calls 1

LinearWrapClass · 0.85

Tested by

no test coverage detected