Esempio n. 1
0
    def __init__(self,
            filters,
            image_shape,
        input_groups,
            input_axes = ('c', 0, 1, 'b'),
            batch_size=None,
            output_axes = ('c', 0, 1, 'b'),
         kernel_stride=(1, 1), pad=0,
         message = '', partial_sum=None):
        """
        .. todo::

            WRITEME
        """

        self.input_groups = input_groups

        warnings.warn("Local ignores partial_sum argument, TODO figure out how James' code controls it")

        LocalDot.__init__(self,
            filters=filters,
            irows=image_shape[0],
            icols=image_shape[1],
            kernel_stride=kernel_stride,
            padding_start=pad,
            message='')
Esempio n. 2
0
    def __init__(self,
            filters,
            image_shape,
        input_groups,
            input_axes = ('c', 0, 1, 'b'),
            batch_size=None,
            output_axes = ('c', 0, 1, 'b'),
         kernel_stride=(1, 1), pad=0,
         message = '', partial_sum=None):
        """
        .. todo::

            WRITEME
        """

        self.input_groups = input_groups

        warnings.warn("Local ignores partial_sum argument, TODO figure out how James' code controls it")

        LocalDot.__init__(self,
            filters=filters,
            irows=image_shape[0],
            icols=image_shape[1],
            subsample=kernel_stride,
            padding_start=pad,
            message='')
Esempio n. 3
0
    def __init__(self,
                 filters,
                 image_shape,
                 input_groups,
                 input_axes=('c', 0, 1, 'b'),
                 batch_size=None,
                 output_axes=('c', 0, 1, 'b'),
                 kernel_stride=(1, 1),
                 pad=0,
                 message='',
                 partial_sum=None):
        self.input_groups = input_groups
        """TODO: Local ignores partial_sum argument,
                 figure out how James' code controls it"""

        if partial_sum is not None:
            logger.warning("partial_sum argument ignored")

        LocalDot.__init__(self,
                          filters=filters,
                          irows=image_shape[0],
                          icols=image_shape[1],
                          subsample=kernel_stride,
                          padding_start=pad,
                          message='')
Esempio n. 4
0
    def __init__(
        self,
        filters,
        image_shape,
        input_groups,
        input_axes=("c", 0, 1, "b"),
        batch_size=None,
        output_axes=("c", 0, 1, "b"),
        subsample=(1, 1),
        pad=0,
        message="",
        partial_sum=None,
    ):

        self.input_groups = input_groups

        warnings.warn("Local ignores partial_sum argument, TODO figure out how James' code controls it")

        LocalDot.__init__(
            self,
            filters=filters,
            irows=image_shape[0],
            icols=image_shape[1],
            subsample=subsample,
            padding_start=pad,
            message="",
        )
Esempio n. 5
0
    def lmul(self, x):

        reshaped = x.reshape((self.input_groups, x.shape[0] / self.input_groups, x.shape[1], x.shape[2], x.shape[3]))

        out = LocalDot.rmul(self, reshaped)

        return out.reshape((out.shape[0] * out.shape[1], out.shape[2], out.shape[3], out.shape[4]))
Esempio n. 6
0
    def lmul(self, x):

        reshaped = x.reshape(( self.input_groups, x.shape[0] / self.input_groups, x.shape[1], x.shape[2], x.shape[3]))

        out = LocalDot.rmul(self, reshaped)

        return out.reshape((out.shape[0] * out.shape[1], out.shape[2], out.shape[3], out.shape[4]))
Esempio n. 7
0
    def __init__(self, filters, image_shape, input_groups,
                 input_axes=('c', 0, 1, 'b'), batch_size=None,
                 output_axes=('c', 0, 1, 'b'), kernel_stride=(1, 1), pad=0,
                 message='', partial_sum=None):
        self.input_groups = input_groups

        """TODO: Local ignores partial_sum argument,
                 figure out how James' code controls it"""

        if partial_sum is not None:
            logger.warning("partial_sum argument ignored")

        LocalDot.__init__(self,
            filters=filters,
            irows=image_shape[0],
            icols=image_shape[1],
            subsample=kernel_stride,
            padding_start=pad,
            message='')