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)
def __init__(self, layers, name, noise_level = 0.5, **kwargs): Notifier.__init__(self) NNStack.__init__(self, layers, layers[0].input, name, **kwargs) CostReconErrDenoise.__init__(self, noise_level, **kwargs) SerializeStack.__init__(self) Monitor.__init__(self) Plotter.__init__(self) self.notify(Notifier.COMPILE_FUNCTIONS) self.notify(Notifier.REGISTER_PLOTTING)
def __init__(self, layers, name, **kwargs): Notifier.__init__(self) NNStack.__init__(self, layers, layers[0].input, name) CostCrossEntropy.__init__(self, **kwargs) SerializeStack.__init__(self) Monitor.__init__(self) Plotter.__init__(self) self.notify(Notifier.COMPILE_FUNCTIONS) self.notify(Notifier.REGISTER_PLOTTING)
def __init__(self, layers, name, **kwargs): Notifier.__init__(self) NNStack.__init__(self, layers, layers[0].input, name, **kwargs) CostCategoricCrossEntropy.__init__(self, self.activation_h(self.input), self.target, **kwargs) SerializeStack.__init__(self) Monitor.__init__(self) Plotter.__init__(self) self.notify(Notifier.COMPILE_FUNCTIONS) self.notify(Notifier.REGISTER_PLOTTING)
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)
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)
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)
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)
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)
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)
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)
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)
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)
def __init__(self, layers, name, lr, momentum = 0.0, n_samples = 1, **kwargs): Notifier.__init__(self) self.momentum = momentum self.sol_shape = list(layers[0].input_shape) self.sol_shape[0] = n_samples self.solution = theano.shared(np.random.uniform(0, 1, size = self.sol_shape).astype(fx), name="solution") self.reset_solution() NNStackLess.__init__(self, layers, layers[0].input, name, **kwargs) DeepDreamer.__init__(self, self.solution, lr, **kwargs) NNFeatures.__init__(self) ParamsBinder.__init__(self, layers) NotifierForwarder.__init__(self, layers) SerializeStack.__init__(self) Monitor.__init__(self) self.notify(Notifier.COMPILE_FUNCTIONS) self.notify(Notifier.REGISTER_PLOTTING)
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)
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)