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

Function _get_config

tensorflow/python/grappler/layout_optimizer_test.py:150–166  ·  view source on GitHub ↗
(layout_optimizer=True)

Source from the content-addressed store, hash-verified

148
149
150def _get_config(layout_optimizer=True):
151 if layout_optimizer:
152 rewrite_options = rewriter_config_pb2.RewriterConfig(
153 layout_optimizer=rewriter_config_pb2.RewriterConfig.ON,
154 # do not remove duplicated nodes
155 arithmetic_optimization=rewriter_config_pb2.RewriterConfig.OFF)
156 else:
157 rewrite_options = rewriter_config_pb2.RewriterConfig(
158 layout_optimizer=rewriter_config_pb2.RewriterConfig.OFF,
159 # do not remove duplicated nodes
160 arithmetic_optimization=rewriter_config_pb2.RewriterConfig.OFF)
161 rewrite_options.min_graph_nodes = -1
162 graph_options = config_pb2.GraphOptions(
163 rewrite_options=rewrite_options, build_cost_model=1)
164 config = config_pb2.ConfigProto(graph_options=graph_options)
165 config.graph_options.optimizer_options.opt_level = -1
166 return config
167
168
169def _simple_metagraph(depthwise=False):

Callers 15

_trainMethod · 0.70
testTwoConvLayersMethod · 0.70
testReduceSumMethod · 0.70
testCastMethod · 0.70
testSqueezeMethod · 0.70
testSqueezeAlongHWMethod · 0.70
testSqueezeAlongNHWMethod · 0.70
testReduceSumAlongHWCMethod · 0.70
testReduceSumAlongNHWMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected