MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Composition

Class Composition

tensorflow/contrib/specs/python/specs_lib.py:172–184  ·  view source on GitHub ↗

A function composition. This simply composes its two argument functions when applied to a final argument via `of`.

Source from the content-addressed store, hash-verified

170
171
172class Composition(Composable):
173 """A function composition.
174
175 This simply composes its two argument functions when
176 applied to a final argument via `of`.
177 """
178
179 def __init__(self, f, g):
180 self.f = f
181 self.g = g
182
183 def funcall(self, x):
184 return self.g.funcall(self.f.funcall(x))
185
186
187# These are DSL names, not Python names

Callers 2

__or__Method · 0.85
__pow__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected