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

Method _grappler_config

tensorflow/lite/python/lite.py:169–178  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

167 self._debug_info = None
168
169 def _grappler_config(self):
170 is_only_flex_enabled = (
171 set([OpsSet.SELECT_TF_OPS]) == set(self.target_spec.supported_ops))
172 optimizers = ["constfold"]
173 if is_only_flex_enabled:
174 # The layout optimizer turns NHCW to NCHW. This provides performance
175 # optimizations when Flex mode is enabled. However, this is not compatible
176 # with builtin ops.
177 optimizers.append("layout")
178 return _get_grappler_config(optimizers)
179
180 def _validate_representative_dataset(self):
181 if self.representative_dataset:

Callers 2

convertMethod · 0.80
convertMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected