Module Expr Str Import alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Call NameLoad keyword ListLoad Str Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword Str If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad TupleLoad AttributeLoad NameLoad attr keyword Str Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Str body Return AttributeLoad NameLoad attr If CompareEq NameLoad Str body Return AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Call NameLoad keyword ListLoad Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad TupleLoad AttributeLoad NameLoad attr keyword Str Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore AttributeLoad NameLoad attr Return BinOpAdd NameLoad NameLoad decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad ListLoad Str Str body Return AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore NameStore Call NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Call NameLoad keyword ListLoad Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpFloorDiv NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpAdd ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore Call NameLoad BinOpSub AttributeLoad NameLoad attr Num ListLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword BinOpAdd AttributeLoad NameLoad attr Num keyword AttributeLoad NameLoad attr Return NameLoad decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str decorator_list ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Call NameLoad keyword ListLoad Str Str Str FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Return NameLoad decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr CompareGt NameLoad Num NameLoad Num decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr keyword Num keyword NameLoad Return BinOpSub NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr keyword Num keyword NameLoad decorator_list Call NameLoad keyword ListLoad Str keyword ListLoad Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Str If CompareEq AttributeLoad NameLoad attr BinOpSub AttributeLoad NameLoad attr Num body Assign NameStore BinOpAdd BinOpMult Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Assign NameStore UnaryOpUSub SubscriptLoad Call AttributeLoad NameLoad attr Index NameLoad orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore UnaryOpUSub Call AttributeLoad BinOpMult NameLoad NameLoad attr keyword Num orelse Raise Call NameLoad Str Return NameLoad decorator_list Call NameLoad keyword ListLoad Str Str keyword ListLoad Str decorator_list ClassDef bases NameLoad body Assign NameStore ListLoad Call NameLoad decorator_list
N/A N/A Some of the simplest individual bricks. N/A logging theano tensor blocks.bricks.base application Brick lazy blocks.bricks.interfaces Activation Feedforward Initializable blocks.bricks.interfaces LinearLike Random blocks.bricks.wrappers WithExtraDims blocks.roles add_role WEIGHT BIAS blocks.utils shared_floatx_nans N/A logger N/A N/A logging getLogger __name__ Linear N/A LinearLike Feedforward N/A N/A A linear transformation with optional bias.

    Brick which applies a linear (affine) transformation by multiplying
    the input with a weight matrix. By default, a bias term is added
    (see :class:`Initializable` for information on disabling this).

    Parameters
    ----------
    input_dim : int
        The dimension of the input. Required by :meth:`~.Brick.allocate`.
    output_dim : int
        The dimension of the output. Required by :meth:`~.Brick.allocate`.

    Notes
    -----
    See :class:`Initializable` for initialization parameters.

    A linear transformation with bias is a matrix multiplication followed
    by a vector summation.

    .. math:: f(\mathbf{x}) = \mathbf{W}\mathbf{x} + \mathbf{b}

     __init__ N/A N/A self input_dim output_dim N/A kwargs N/A N/A N/A N/A N/A super Linear self __init__ kwargs N/A N/A self input_dim input_dim N/A N/A self output_dim output_dim N/A N/A lazy allocation N/A input_dim output_dim _allocate N/A N/A self N/A N/A N/A W N/A shared_floatx_nans N/A N/A self input_dim N/A self output_dim name W N/A N/A add_role W WEIGHT N/A N/A N/A N/A self parameters append W N/A N/A N/A self add_auxiliary_variable N/A N/A W norm 2 name W_norm N/A N/A self use_bias N/A N/A b N/A shared_floatx_nans N/A N/A self output_dim name b N/A N/A add_role b BIAS N/A N/A N/A N/A self parameters append b N/A N/A N/A self add_auxiliary_variable N/A N/A b norm 2 name b_norm N/A apply N/A N/A self input_ N/A N/A N/A Apply the linear transformation.

        Parameters
        ----------
        input_ : :class:`~tensor.TensorVariable`
            The input on which to apply the transformation

        Returns
        -------
        output : :class:`~tensor.TensorVariable`
            The transformed input plus optional bias

         N/A output N/A N/A tensor dot input_ N/A self W N/A N/A self use_bias N/A N/A output N/A self b N/A output N/A N/A application inputs N/A input_ outputs N/A output get_dim N/A N/A self name N/A N/A N/A N/A name input_ N/A N/A N/A self input_dim N/A N/A name output N/A N/A N/A self output_dim N/A N/A N/A N/A super Linear self get_dim name N/A N/A Bias N/A Feedforward Initializable N/A N/A Add a bias (i.e. sum with a vector). __init__ N/A N/A self dim N/A kwargs N/A N/A N/A N/A N/A super Bias self __init__ kwargs N/A N/A self dim dim N/A N/A lazy allocation N/A dim _allocate N/A N/A self N/A N/A N/A b N/A shared_floatx_nans N/A N/A self output_dim name b N/A N/A add_role b BIAS N/A N/A N/A N/A self parameters append b N/A _initialize N/A N/A self N/A N/A N/A N/A b N/A self parameters N/A N/A N/A N/A self biases_init initialize b N/A self rng N/A apply N/A N/A self input_ N/A N/A N/A Apply the linear transformation.

        Parameters
        ----------
        input_ : :class:`~tensor.TensorVariable`
            The input on which to apply the transformation

        Returns
        -------
        output : :class:`~tensor.TensorVariable`
            The transformed input plus optional bias

         N/A N/A b N/A self parameters N/A N/A input_ b N/A N/A application inputs N/A input_ outputs N/A output get_dim N/A N/A self name N/A N/A N/A N/A name N/A input_ output N/A N/A N/A self dim N/A N/A N/A N/A super Bias self get_dim name N/A _get_dim N/A N/A self N/A N/A N/A N/A self dim N/A _set_dim N/A N/A self value N/A N/A N/A N/A self dim value N/A N/A input_dim output_dim N/A property _get_dim _set_dim N/A Maxout N/A Brick N/A N/A Maxout pooling transformation.

    A brick that does max pooling over groups of input units. If you use
    this code in a research project, please cite [GWFM13]_.

    .. [GWFM13] Ian J. Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron
       Courville, and Yoshua Bengio, *Maxout networks*, ICML (2013), pp.
       1319-1327.

    Parameters
    ----------
    num_pieces : int
        The size of the groups the maximum is taken over.

    Notes
    -----
    Maxout applies a set of linear transformations to a vector and selects
    for each output dimension the result with the highest value.

     __init__ N/A N/A self num_pieces N/A kwargs N/A N/A N/A N/A N/A super Maxout self __init__ kwargs N/A N/A self num_pieces num_pieces N/A N/A lazy allocation N/A num_pieces apply N/A N/A self input_ N/A N/A N/A Apply the maxout transformation.

        Parameters
        ----------
        input_ : :class:`~tensor.TensorVariable`
            The input on which to apply the transformation

        Returns
        -------
        output : :class:`~tensor.TensorVariable`
            The transformed input

         N/A last_dim N/A N/A input_ shape N/A -1 N/A output_dim N/A last_dim N/A self num_pieces N/A new_shape N/A N/A N/A N/A input_ shape N/A i N/A i N/A range N/A N/A input_ ndim 1 N/A output_dim N/A self num_pieces N/A output N/A N/A tensor max N/A N/A input_ reshape new_shape ndim N/A N/A input_ ndim 1 axis N/A input_ ndim N/A output N/A N/A application inputs N/A input_ outputs N/A output N/A LinearMaxout N/A Initializable Feedforward N/A N/A Maxout pooling following a linear transformation.

    This code combines the :class:`Linear` brick with a :class:`Maxout`
    brick.

    Parameters
    ----------
    input_dim : int
        The dimension of the input. Required by :meth:`~.Brick.allocate`.
    output_dim : int
        The dimension of the output. Required by :meth:`~.Brick.allocate`.
    num_pieces : int
        The number of linear functions. Required by
        :meth:`~.Brick.allocate`.

    Notes
    -----
    See :class:`Initializable` for initialization parameters.

     __init__ N/A N/A self input_dim output_dim num_pieces N/A kwargs N/A N/A N/A N/A N/A super LinearMaxout self __init__ kwargs N/A N/A self linear N/A Linear N/A N/A self maxout N/A Maxout N/A N/A self children N/A N/A self linear N/A self maxout N/A N/A self input_dim input_dim N/A N/A self output_dim output_dim N/A N/A self num_pieces num_pieces N/A N/A lazy allocation N/A input_dim output_dim num_pieces input_dim N/A N/A self N/A N/A N/A N/A N/A self linear input_dim N/A property input_dim N/A N/A self value N/A N/A N/A N/A N/A self linear input_dim value N/A N/A input_dim setter _push_allocation_config N/A N/A self N/A N/A N/A N/A N/A self linear output_dim N/A N/A self output_dim N/A self num_pieces N/A N/A N/A self maxout num_pieces N/A self num_pieces N/A apply N/A N/A self input_ N/A N/A N/A Apply the linear transformation followed by maxout.

        Parameters
        ----------
        input_ : :class:`~tensor.TensorVariable`
            The input on which to apply the transformations

        Returns
        -------
        output : :class:`~tensor.TensorVariable`
            The transformed input

         N/A pre_activation N/A N/A N/A self linear apply input_ N/A output N/A N/A N/A self maxout apply pre_activation N/A output N/A N/A application inputs N/A input_ outputs N/A output N/A Identity N/A Activation N/A apply N/A N/A self input_ N/A N/A N/A input_ N/A N/A application inputs N/A input_ outputs N/A output N/A Tanh N/A Activation N/A apply N/A N/A self input_ N/A N/A N/A N/A N/A tensor tanh input_ N/A N/A application inputs N/A input_ outputs N/A output N/A Logistic N/A Activation N/A apply N/A N/A self input_ N/A N/A N/A N/A N/A N/A tensor nnet sigmoid input_ N/A N/A application inputs N/A input_ outputs N/A output N/A Softplus N/A Activation N/A N/A  Softplus brick.

    The softplus is defined as :math:`\zeta(x) = \log(1+e^x)`.

    .. Dugas, C., Bengio, Y., Belisle, F., Nadeau, C., and Garcia,
       R. (2001). Incorporating second-order functional knowledge
       for better option pricing. In NIPS 13 . MIT Press.

     apply N/A N/A self input_ N/A N/A N/A N/A N/A N/A tensor nnet softplus input_ N/A N/A application inputs N/A input_ outputs N/A output N/A Rectifier N/A Activation N/A apply N/A N/A self input_ N/A N/A N/A N/A N/A tensor switch N/A input_ 0 input_ 0 N/A N/A application inputs N/A input_ outputs N/A output N/A Softmax N/A Brick N/A N/A A softmax brick.

    Works with 2-dimensional inputs only. If you need more,
    see :class:`NDimensionalSoftmax`.

     apply N/A N/A self input_ N/A N/A N/A Standard softmax.

        Parameters
        ----------
        input_ : :class:`~theano.Variable`
            A matrix, each row contains unnormalized log-probabilities of a
            distribution.

        Returns
        -------
        output_ : :class:`~theano.Variable`
            A matrix with probabilities in each row for each distribution
            from `input_`.

         N/A N/A N/A N/A tensor nnet softmax input_ N/A N/A application inputs N/A input_ outputs N/A output log_probabilities N/A N/A self input_ N/A N/A N/A Normalize log-probabilities.

        Converts unnormalized log-probabilities (exponents of which do not
        sum to one) into actual log-probabilities (exponents of which sum
        to one).

        Parameters
        ----------
        input_ : :class:`~theano.Variable`
            A matrix, each row contains unnormalized log-probabilities of a
            distribution.

        Returns
        -------
        output : :class:`~theano.Variable`
            A matrix with normalized log-probabilities in each row for each
            distribution from `input_`.

         N/A shifted N/A input_ N/A N/A input_ max axis 1 keepdims True N/A N/A shifted N/A N/A tensor log N/A N/A N/A N/A tensor exp shifted sum axis 1 keepdims True N/A N/A application inputs N/A input_ outputs N/A output categorical_cross_entropy N/A N/A self application_call y x N/A N/A N/A Computationally stable cross-entropy for pre-softmax values.

        Parameters
        ----------
        y : :class:`~tensor.TensorVariable`
            In the case of a matrix argument, each row represents a
            probabilility distribution. In the vector case, each element
            represents a distribution by specifying the position of 1 in a
            1-hot vector.
        x : :class:`~tensor.TensorVariable`
            A matrix, each row contains unnormalized probabilities of a
            distribution.

        Returns
        -------
        cost : :class:`~tensor.TensorVariable`
            A vector of cross-entropies between respective distributions
            from y and x.

         N/A x N/A N/A self log_probabilities x N/A N/A N/A application_call add_auxiliary_variable N/A N/A x copy name log_probabilities N/A N/A N/A y ndim N/A N/A x ndim 1 N/A N/A indices N/A N/A N/A N/A tensor arange N/A N/A y shape N/A 0 N/A N/A x shape N/A 1 y N/A cost N/A N/A N/A N/A x flatten N/A indices N/A N/A N/A N/A y ndim N/A x ndim N/A N/A cost N/A N/A N/A N/A x y sum axis 1 N/A N/A N/A TypeError rank mismatch between x and y N/A cost N/A N/A application inputs N/A y x outputs N/A output N/A NDimensionalSoftmax N/A Softmax N/A N/A decorators N/A N/A WithExtraDims N/A