def arg_to_softmax(prob):
 if (not isinstance(prob, Variable)):
  raise TypeError()
 if (prob.owner is None):
  raise TypeError()
 owner = prob.owner
 if (not isinstance(owner.op, T.nnet.Softmax)):
  raise TypeError()
 (rval,) = owner.inputs
 return rval

def arg_to_softmax ( prob ) : if ( not isinstance ( prob , Variable ) ) : raise TypeError ( ) if ( prob . owner is None ) : raise TypeError ( ) owner = prob . owner if ( not isinstance ( owner . op , T . nnet . Softmax ) ) : raise TypeError ( ) ( rval , ) = owner . inputs return rval
oh no! someone has passed you the probability output .