Пример #1
0
    def __init__(self, variables, filter_shape, input_shape, out_shape, name,
                 **kwargs):
        assert kwargs[
            "convolutional"] == True, "Set 'convolutional = True' in configuration."
        kwargs['variables'] = create_in_trg_conv(kwargs['name'])
        Notifier.__init__(self)
        Plotter.__init__(self)
        UnitsCNNReLU.__init__(self, **kwargs)

        assert not -1 in out_shape, "For de-convolutional layers, you need to " + \
                            "define the 'out_shape' in the configuration file."

        filt_size = (input_shape[1], out_shape[1], filter_shape[2],
                     out_shape[3])
        LOGGER.debug("out_size {0}".format(out_shape))
        LOGGER.debug("filt_size {0}".format(filt_size))

        DCNN.__init__(self, variables, name, input_shape, filt_size, out_shape,
                      **kwargs)

        CostCrossEntropy.__init__(self, **kwargs)
        WeightRegular.__init__(self, **kwargs)
        SparsityLeeConv.__init__(self, **kwargs)
        MaxNormRegular.__init__(self, **kwargs)
        SerializeLayer.__init__(self)
        Monitor.__init__(self)
        self.notify(Notifier.MAKE_FINISHED)
        self.notify(Notifier.COMPILE_FUNCTIONS)
        self.notify(Notifier.REGISTER_PLOTTING)
Пример #2
0
 def __init__(self, **kwargs):
     kwargs['variables'] = create_in_trg(kwargs['name'])
     Notifier.__init__(self)
     UnitsNNSoftmax.__init__(self)
     NN_BN.__init__(self, **kwargs)
     CostCategoricCrossEntropy.__init__(self, **kwargs)
     WeightRegular.__init__(self, **kwargs)
     MaxNormRegular.__init__(self, **kwargs)
     SerializeLayer.__init__(self)
     Monitor.__init__(self)
     self.notify(Notifier.MAKE_FINISHED)
     self.notify(Notifier.COMPILE_FUNCTIONS)
     self.notify(Notifier.REGISTER_PLOTTING)
Пример #3
0
 def __init__(self, **kwargs):
     kwargs['variables'] = create_in(kwargs['name'])
     Notifier.__init__(self)
     UnitsRBMSigmoid.__init__(self)
     SparsityGOH.__init__(self, **kwargs)
     RBM.__init__(self, **kwargs)
     CostCD.__init__(self, **kwargs)
     WeightRegular.__init__(self, **kwargs)
     SerializeLayer.__init__(self)
     Monitor.__init__(self)
     self.notify(Notifier.MAKE_FINISHED)
     self.notify(Notifier.COMPILE_FUNCTIONS)
     self.notify(Notifier.REGISTER_PLOTTING)
Пример #4
0
 def __init__(self, **kwargs):
     assert kwargs[
         "convolutional"] == True, "Set 'convolutional = True' in configuration."
     kwargs['variables'] = create_in_conv(kwargs['name'])
     Notifier.__init__(self)
     UnitsCRBMGauss.__init__(self)
     CRBM.__init__(self, **kwargs)
     CostCD.__init__(self, **kwargs)
     WeightRegular.__init__(self, **kwargs)
     SerializeLayer.__init__(self)
     Monitor.__init__(self)
     self.notify(Notifier.MAKE_FINISHED)
     self.notify(Notifier.COMPILE_FUNCTIONS)
     self.notify(Notifier.REGISTER_PLOTTING)
Пример #5
0
 def __init__(self, **kwargs):
     kwargs['variables'] = create_in_trg(kwargs['name'])
     Notifier.__init__(self)
     UnitsNNReLU.__init__(self)
     NN_BN.__init__(self, **kwargs)
     CostSquaredError.__init__(self, **kwargs)
     WeightRegular.__init__(self, **kwargs)
     MaxNormRegular.__init__(self, **kwargs)
     SparsityLee.__init__(self, **kwargs)
     SerializeLayer.__init__(self)
     Monitor.__init__(self)
     self.notify(Notifier.MAKE_FINISHED)
     self.notify(Notifier.COMPILE_FUNCTIONS)
     self.notify(Notifier.REGISTER_PLOTTING)
Пример #6
0
    def __init__(self, **kwargs):
        kwargs['variables'] = create_in_trg(kwargs['name'])
        Notifier.__init__(self)
        UnitsNNTanh.__init__(self)

        LSTM.__init__(self, act_fun_out=lambda x: T.nnet.sigmoid(x), **kwargs)
        CostLogLikelihoodBinomial.__init__(self, **kwargs)
        SparsityLee.__init__(self, **kwargs)
        WeightRegularRNN.__init__(self, **kwargs)
        SerializeLayer.__init__(self)
        Monitor.__init__(self)
        Plotter.__init__(self)
        self.notify(Notifier.MAKE_FINISHED)
        self.notify(Notifier.COMPILE_FUNCTIONS)
        self.notify(Notifier.REGISTER_PLOTTING)
Пример #7
0
 def __init__(self, **kwargs):
     kwargs['variables'] = create_in(kwargs['name'])
     Notifier.__init__(self)
     UnitsNNLinear.__init__(self)
     UnitsDropOut.__init__(self, **kwargs)
     NonNegative.__init__(self, **kwargs)
     NNAuto.__init__(self, **kwargs)
     CostSquaredError.__init__(self, **kwargs)
     SparsityLee.__init__(self, **kwargs)
     WeightRegular.__init__(self, **kwargs)
     SerializeLayer.__init__(self)
     Monitor.__init__(self)
     Plotter.__init__(self)
     self.notify(Notifier.MAKE_FINISHED)
     self.notify(Notifier.COMPILE_FUNCTIONS)
     self.notify(Notifier.REGISTER_PLOTTING)
Пример #8
0
 def __init__(self, **kwargs):
     kwargs['variables'] = create_in(kwargs['name'])
     Notifier.__init__(self)
     UnitsRBMReLU.__init__(self)
     UnitsDropOut.__init__(self, **kwargs)
     SparsityLee.__init__(self, **kwargs)
     RBM.__init__(self, **kwargs)
     CostCD.__init__(self, **kwargs)
     WeightRegular.__init__(self, **kwargs)
     MaxNormRegular.__init__(self, **kwargs)
     SerializeLayer.__init__(self)
     ActivationCrop.__init__(self, **kwargs)
     Monitor.__init__(self)
     self.notify(Notifier.MAKE_FINISHED)
     self.notify(Notifier.COMPILE_FUNCTIONS)
     self.notify(Notifier.REGISTER_PLOTTING)
Пример #9
0
 def __init__(self, **kwargs):
     assert kwargs[
         "convolutional"] == True, "Set 'convolutional = True' in configuration."
     kwargs['variables'] = create_in_conv(kwargs['name'])
     Notifier.__init__(self)
     UnitsCRBMSigmoid.__init__(self)
     CRBM.__init__(self, **kwargs)
     CostPCD.__init__(self, **kwargs)
     SparsityLeeConv.__init__(self, **kwargs)
     MaxNormRegular.__init__(self, **kwargs)
     WeightRegular.__init__(self, **kwargs)
     ActivationCrop.__init__(self, **kwargs)
     Approximator.__init__(self, **kwargs)
     Monitor.__init__(self)
     SerializeLayer.__init__(self)
     self.notify(Notifier.MAKE_FINISHED)
     self.notify(Notifier.COMPILE_FUNCTIONS)
     self.notify(Notifier.REGISTER_PLOTTING)
Пример #10
0
 def __init__(self, **kwargs):
     assert kwargs[
         "convolutional"] == True, "Set 'convolutional = True' in configuration."
     kwargs['variables'] = create_in_trg_conv(kwargs['name'])
     Notifier.__init__(self)
     Plotter.__init__(self)
     UnitsCNNSigmoid.__init__(self, **kwargs)
     UnitsDropOut.__init__(self, **kwargs)
     CNN_BN.__init__(self, **kwargs)
     CostCrossEntropy.__init__(self, **kwargs)
     WeightRegular.__init__(self, **kwargs)
     MaxNormRegular.__init__(self, **kwargs)
     SparsityLeeConv.__init__(self, **kwargs)
     SerializeLayer.__init__(self)
     Monitor.__init__(self)
     self.notify(Notifier.MAKE_FINISHED)
     self.notify(Notifier.COMPILE_FUNCTIONS)
     self.notify(Notifier.REGISTER_PLOTTING)
Пример #11
0
    def __init__(self, **kwargs):
        kwargs['variables'] = create_in_trg(kwargs['name'])
        Notifier.__init__(self)
        UnitsNNTanh.__init__(self)

        RNN_Gated.__init__(self,
                           act_fun_out=lambda x: T.nnet.sigmoid(x),
                           **kwargs)
        CostCrossEntropy.__init__(self, **kwargs)
        SparsityLee.__init__(self, **kwargs)
        weight_params = [
            self.Wxh, self.Wxr, self.Wxu, self.Whh, self.Why, self.Whr,
            self.Whu
        ]
        WeightRegular.__init__(self, wl_targets=weight_params, **kwargs)
        SerializeLayer.__init__(self)
        Monitor.__init__(self)
        Plotter.__init__(self)
        self.notify(Notifier.MAKE_FINISHED)
        self.notify(Notifier.COMPILE_FUNCTIONS)
        self.notify(Notifier.REGISTER_PLOTTING)
Пример #12
0
 def __init__(self, **kwargs):
     assert kwargs[
         "convolutional"] == True, "Set 'convolutional = True' in configuration."
     kwargs['variables'] = create_in_trg_conv(kwargs['name'])
     Notifier.__init__(self)
     Plotter.__init__(self)
     try:
         UnitsCNNReLU.__init__(self,
                               downsample_out=kwargs['downsample_out'])
     except KeyError:
         raise ValueError("Entry 'downsample_out' in kwargs needed.")
     UnitsDropOut.__init__(self, **kwargs)
     CNN_BN.__init__(self, **kwargs)
     CostCrossEntropy.__init__(self)
     WeightRegular.__init__(self, **kwargs)
     SparsityLeeConv.__init__(self, **kwargs)
     MaxNormRegular.__init__(self, **kwargs)
     SerializeLayer.__init__(self)
     Monitor.__init__(self)
     self.notify(Notifier.MAKE_FINISHED)
     self.notify(Notifier.COMPILE_FUNCTIONS)
     self.notify(Notifier.REGISTER_PLOTTING)