warnings.warn("The behavior of max when axis==None will change! Now we return the max over the last dimensions. It will change to the max over all dimensions as numpy. To hide this warning and be compatible with the future behavior, set axis to -1 to have the current behavior. To have the futur behavior set axis to range(nb dim), but this don't support the grad. To have the grad, you must flatten the tensor before calling max().")
warnings.warn("The behavior of max when axis==None will change! Now we return the max over the last dimensions. It will change to the max over all dimensions as numpy. To hide this warning and be compatible with the future behavior, set axis to -1 to have the current behavior. To have the futur behavior set axis to range(nb dim), but this don't support the grad. To have the grad, you must flatten the tensor before calling max().")
ifisinstance(axis,(list,tuple))andlen(axis)>1:
ifisinstance(axis,(list,tuple))andlen(axis)>1:
returnCAReduce(scal.maximum,axis)(x)
returnCAReduce(scal.maximum,axis)(x)
try:
try:
const=get_constant_value(axis)
const=get_constant_value(axis)
returnCAReduce(scal.maximum,list(const))(x)
returnCAReduce(scal.maximum,list(const))(x)
except:
except:
returnmax_and_argmax(x,axis)[0]
returnmax_and_argmax(x,axis)[0]
@constructor
@constructor
defargmax(x,axis='DEFAULT'):
defargmax(x,axis='DEFAULT'):
...
@@ -2086,16 +2086,16 @@ class Mean(elemwise.CAReduce):
...
@@ -2086,16 +2086,16 @@ class Mean(elemwise.CAReduce):