Expand an error message with a known workaround; add flag to enable said workaround.
PiperOrigin-RevId: 254105522
This commit is contained in:
parent
401bbfc336
commit
223d17868c
@ -1359,6 +1359,11 @@ class BaseSession(SessionInterface):
|
||||
except KeyError:
|
||||
pass
|
||||
message = error_interpolation.interpolate(message, self._graph)
|
||||
if 'only supports NHWC tensor format' in message:
|
||||
message += ('\nA possible workaround: Try disabling Grappler optimizer'
|
||||
'\nby modifying the config for creating the session eg.'
|
||||
'\nsession_config.graph_options.rewrite_options.'
|
||||
'disable_meta_optimizer = True')
|
||||
raise type(e)(node_def, op, message)
|
||||
|
||||
def _extend_graph(self):
|
||||
|
Loading…
Reference in New Issue
Block a user