def _reduce_logsumexp(input_tensor, axis=None, keepdims=False, name=None):  
try:<EOL><INDENT>return scipy_special.logsumexp(<EOL>input_tensor, axis=_astuple(axis), keepdims=keepdims)<EOL><DEDENT>except NotImplementedError:<EOL><INDENT>m = _max_mask_non_finite(input_tensor, axis=axis, keepdims=True)<EOL>y = input_tensor - m<EOL>y = np.exp(y, out=y)<EOL>return m + np.log(np.sum(y, axis=_astuple(axis), keepdims=keepdims))<EOL><DEDENT>
Computes `log(sum(exp(input_tensor))) along the specified axis.