Project Name: tensorlayer+TensorLayer
Language: Python
Statement Type: Branch

Source Code:
def _normalize_docstring(docstring):
    """Normalizes the docstring.

    Replaces tabs with spaces, removes leading and trailing blanks lines, and
    removes any indentation.

    Copied from PEP-257:
    https://www.python.org/dev/peps/pep-0257/#handling-docstring-indentation

    Args:
        docstring: the docstring to normalize

    Returns:
        The normalized docstring
    """
    if not docstring:
        return ''
    # Convert tabs to spaces (following the normal Python rules)
    # and split into a list of lines:
    lines = docstring.expandtabs().splitlines()
    # Determine minimum indentation (first line doesn't count):
    # (we use sys.maxsize because sys.maxint doesn't exist in Python 3)
    indent = sys.maxsize
    for line in lines[1:]:
        stripped = line.lstrip()
        if stripped:
            indent = min(indent, len(line) - len(stripped))
    # Remove indentation (first line is special):
    trimmed = [lines[0].strip()]
    if indent < sys.maxsize:
        for line in lines[1:]:
            trimmed.append(line[indent:].rstrip())
    # Strip off trailing and leading blank lines:
    while trimmed and not trimmed[-1]:
        trimmed.pop()
    while trimmed and not trimmed[0]:
        trimmed.pop(0)
    # Return a single string:
    return '\n'.join(trimmed)

_normalize_docstring(docstring='Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.\n\n    Usually be used for image segmentation.\n\n    Parameters\n    ----------\n    x : Tensor\n        input.\n            - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.\n            - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.\n    name : str\n        function name (optional)\n\n    Returns\n    -------\n    Tensor\n        A ``Tensor`` in the same type as ``x``.\n\n    Examples\n    --------\n    >>> outputs = pixel_wise_softmax(network.outputs)\n    >>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)\n\n    References\n    ----------\n    - `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__\n\n    ')

Selected Statement: if not docstring:

Function Input:
docstring: 'Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.\n\n    Usually be used for image segmentation.\n\n    Parameters\n    ----------\n    x : Tensor\n        input.\n            - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.\n            - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.\n    name : str\n        function name (optional)\n\n    Returns\n    -------\n    Tensor\n        A ``Tensor`` in the same type as ``x``.\n\n    Examples\n    --------\n    >>> outputs = pixel_wise_softmax(network.outputs)\n    >>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)\n\n    References\n    ----------\n    - `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__\n\n    '

Variable Values Before Statement:
docstring: 'Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.\n\n    Usually be used for image segmentation.\n\n    Parameters\n    ----------\n    x : Tensor\n        input.\n            - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.\n            - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.\n    name : str\n        function name (optional)\n\n    Returns\n    -------\n    Tensor\n        A ``Tensor`` in the same type as ``x``.\n\n    Examples\n    --------\n    >>> outputs = pixel_wise_softmax(network.outputs)\n    >>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)\n\n    References\n    ----------\n    - `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__\n\n    '

Value After Statement Execution: No

Variable States During Runtime (line, value):
docstring: 1
'Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.\n\n    Usually be used for image segmentation.\n\n    Parameters\n    ----------\n    x : Tensor\n        input.\n            - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.\n            - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.\n    name : str\n        function name (optional)\n\n    Returns\n    -------\n    Tensor\n        A ``Tensor`` in the same type as ``x``.\n\n    Examples\n    --------\n    >>> outputs = pixel_wise_softmax(network.outputs)\n    >>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)\n\n    References\n    ----------\n    - `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__\n\n    '
lines: 20
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
    Usually be used for image segmentation.
    Parameters
    ----------
    x : Tensor
        input.
            - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
            - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
    name : str
        function name (optional)
    Returns
    -------
    Tensor
        A ``Tensor`` in the same type as ``x``.
    Examples
    --------
    >>> outputs = pixel_wise_softmax(network.outputs)
    >>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)
    References
    ----------
    - `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__
    
indent: 23
9223372036854775807
27
4
line: 24
''
24
'    Usually be used for image segmentation.'
24
''
24
'    Parameters'
24
'    ----------'
24
'    x : Tensor'
24
'        input.'
24
'            - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.'
24
'            - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.'
24
'    name : str'
24
'        function name (optional)'
24
''
24
'    Returns'
24
'    -------'
24
'    Tensor'
24
'        A ``Tensor`` in the same type as ``x``.'
24
''
24
'    Examples'
24
'    --------'
24
'    >>> outputs = pixel_wise_softmax(network.outputs)'
24
'    >>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)'
24
''
24
'    References'
24
'    ----------'
24
'    - `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__'
24
''
24
'    '
31
''
31
'    Usually be used for image segmentation.'
31
''
31
'    Parameters'
31
'    ----------'
31
'    x : Tensor'
31
'        input.'
31
'            - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.'
31
'            - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.'
31
'    name : str'
31
'        function name (optional)'
31
''
31
'    Returns'
31
'    -------'
31
'    Tensor'
31
'        A ``Tensor`` in the same type as ``x``.'
31
''
31
'    Examples'
31
'    --------'
31
'    >>> outputs = pixel_wise_softmax(network.outputs)'
31
'    >>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)'
31
''
31
'    References'
31
'    ----------'
31
'    - `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__'
31
''
31
'    '
stripped: 25
''
25
'Usually be used for image segmentation.'
25
''
25
'Parameters'
25
'----------'
25
'x : Tensor'
25
'input.'
25
'- For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.'
25
'- For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.'
25
'name : str'
25
'function name (optional)'
25
''
25
'Returns'
25
'-------'
25
'Tensor'
25
'A ``Tensor`` in the same type as ``x``.'
25
''
25
'Examples'
25
'--------'
25
'>>> outputs = pixel_wise_softmax(network.outputs)'
25
'>>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)'
25
''
25
'References'
25
'----------'
25
'- `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__'
25
''
trimmed: 29
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
>>> outputs = pixel_wise_softmax(network.outputs)
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
>>> outputs = pixel_wise_softmax(network.outputs)
>>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
>>> outputs = pixel_wise_softmax(network.outputs)
>>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
>>> outputs = pixel_wise_softmax(network.outputs)
>>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)
References
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
>>> outputs = pixel_wise_softmax(network.outputs)
>>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)
References
----------
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
>>> outputs = pixel_wise_softmax(network.outputs)
>>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)
References
----------
- `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
>>> outputs = pixel_wise_softmax(network.outputs)
>>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)
References
----------
- `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__
32
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
>>> outputs = pixel_wise_softmax(network.outputs)
>>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)
References
----------
- `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__
35
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
>>> outputs = pixel_wise_softmax(network.outputs)
>>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)
References
----------
- `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__
35
Return the softmax outputs of images, every pixels have multiple label, the sum of a pixel is 1.
Usually be used for image segmentation.
Parameters
----------
x : Tensor
    input.
        - For 2d image, 4D tensor (batch_size, height, weight, channel), where channel >= 2.
        - For 3d image, 5D tensor (batch_size, depth, height, weight, channel), where channel >= 2.
name : str
    function name (optional)
Returns
-------
Tensor
    A ``Tensor`` in the same type as ``x``.
Examples
--------
>>> outputs = pixel_wise_softmax(network.outputs)
>>> dice_loss = 1 - dice_coe(outputs, y_, epsilon=1e-5)
References
----------
- `tf.reverse <https://www.tensorflow.org/versions/master/api_docs/python/array_ops.html#reverse>`__