@gof.local_optimizer([Assert])
def local_remove_all_assert(node):
 if (not isinstance(node.op, Assert)):
  return
 return [node.inputs[0]]

@ gof . local_optimizer ( [ Assert ] ) def local_remove_all_assert ( node ) : if ( not isinstance ( node . op , Assert ) ) : return return [ node . inputs [ 0 ] ]
an optimization disabled by default that removes all asserts from the graph .