Modify the default setting of softmax cudnn (#28672)

musl/disable_test_yolov3_temporarily
GaoWei8 4 years ago committed by GitHub
parent fafadbab70
commit a049dff78f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1198,7 +1198,7 @@ def chunk_eval(input,
@deprecated(since="2.0.0", update_to="paddle.nn.functional.softmax")
def softmax(input, use_cudnn=False, name=None, axis=-1):
def softmax(input, use_cudnn=True, name=None, axis=-1):
r"""
This operator implements the softmax layer. The calculation process is as follows:

@ -843,7 +843,7 @@ def softmax(x, axis=-1, dtype=None, name=None):
if (dtype is not None) and (not isinstance(dtype, core.VarDesc.VarType)):
dtype = convert_np_dtype_to_dtype_(dtype)
use_cudnn = True if axis is -1 else False
use_cudnn = True
if in_dygraph_mode():
outs_cast = x if dtype is None \

Loading…
Cancel
Save