@register_uncanonicalize
@gof.local_optimizer([T.MaxAndArgmax])
def local_max_and_argmax(node):
 if isinstance(node.op, T.MaxAndArgmax):
  axis = node.op.get_params(node)
  if (len(node.outputs[1].clients) == 0):
   new = CAReduce(scal.maximum, axis)(node.inputs[0])
   return [new, None]
  if (len(node.outputs[0].clients) == 0):
   return [None, T._argmax(node.inputs[0], axis)]

@ register_uncanonicalize @ gof . local_optimizer ( [ T . MaxAndArgmax ] ) def local_max_and_argmax ( node ) : if isinstance ( node . op , T . MaxAndArgmax ) : axis = node . op . get_params ( node ) if ( len ( node . outputs [ 1 ] . clients ) == 0 ) : new = CAReduce ( scal . maximum , axis ) ( node . inputs [ 0 ] ) return [ new , None ] if ( len ( node . outputs [ 0 ] . clients ) == 0 ) : return [ None , T . _argmax ( node . inputs [ 0 ] , axis ) ]
if we dont use the argmax .