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

Method _make_predict_function

tensorflow/python/keras/engine/training.py:2165–2179  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2163 setattr(self, 'test_function', fn)
2164
2165 def _make_predict_function(self):
2166 if not hasattr(self, 'predict_function'):
2167 self.predict_function = None
2168 if self.predict_function is None:
2169 inputs = self._feed_inputs
2170 # Gets network outputs. Does not update weights.
2171 # Does update the network states.
2172 kwargs = getattr(self, '_function_kwargs', {})
2173 with K.name_scope(ModeKeys.PREDICT):
2174 self.predict_function = K.function(
2175 inputs,
2176 self.outputs,
2177 updates=self.state_updates,
2178 name='predict_function',
2179 **kwargs)
2180
2181 def _make_execution_function(self, mode):
2182 if mode == ModeKeys.TRAIN:

Callers 3

predict_on_batchMethod · 0.95
_export_modeFunction · 0.45

Calls 2

name_scopeMethod · 0.45
functionMethod · 0.45

Tested by

no test coverage detected