def sigmoid(x, name=None): """ Computes the element-wise sigmoid of `x`: :math:`sigmoid(x) = {1 \over {1+\exp(-x)}}` The output tensor has the same shape as `x`. Example: >>> C.eval(C.sigmoid([-2, -1., 0., 1., 2.])) [array([[ 0.119203, 0.268941, 0.5 , 0.731059, 0.880797]])] Args: x: any :class:`cntk.graph.ComputationNode` that outputs a tensor Returns: :class:`cntk.graph.ComputationNode` """ from cntk.ops.cntk2 import Sigmoid op = Sigmoid(x, name=name) wrap_numpy_arrays(op) op.rank = op._.rank return op