Python keras.initializers 模块,serialize() 实例源码

我们从Python开源项目中,提取了以下38个代码示例,用于说明如何使用keras.initializers.serialize()

项目:nn_playground    作者:DingKe    | 项目源码 | 文件源码
def get_config(self):
        config = {'output_dim': self.output_dim,
                  'window_size': self.window_size,
                  'init': self.init.get_config(),
                  'stride': self.strides[0],
                  'activation': activations.serialize(self.activation),
                  'kernel_initializer': initializers.serialize(self.kernel_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
                  'bias_regularizer': regularizers.serialize(self.bias_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activy_regularizer),
                  'kernel_constraint': constraints.serialize(self.kernel_constraint),
                  'bias_constraint': constraints.serialize(self.bias_constraint),
                  'use_bias': self.use_bias,
                  'input_dim': self.input_dim,
                  'input_length': self.input_length}
        base_config = super(GCNN, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:nn_playground    作者:DingKe    | 项目源码 | 文件源码
def get_config(self):
        config = {'units': self.units,
                  'window_size': self.window_size,
                  'stride': self.strides[0],
                  'return_sequences': self.return_sequences,
                  'go_backwards': self.go_backwards,
                  'stateful': self.stateful,
                  'unroll': self.unroll,
                  'use_bias': self.use_bias,
                  'dropout': self.dropout,
                  'activation': activations.serialize(self.activation),
                  'kernel_initializer': initializers.serialize(self.kernel_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
                  'bias_regularizer': regularizers.serialize(self.bias_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activity_regularizer),
                  'kernel_constraint': constraints.serialize(self.kernel_constraint),
                  'bias_constraint': constraints.serialize(self.bias_constraint),
                  'input_dim': self.input_dim,
                  'input_length': self.input_length}
        base_config = super(QRNN, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:Keras-Multiplicative-LSTM    作者:titu1994    | 项目源码 | 文件源码
def get_config(self):
        config = {'units': self.units,
                  'activation': activations.serialize(self.activation),
                  'recurrent_activation': activations.serialize(self.recurrent_activation),
                  'use_bias': self.use_bias,
                  'kernel_initializer': initializers.serialize(self.kernel_initializer),
                  'recurrent_initializer': initializers.serialize(self.recurrent_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'unit_forget_bias': self.unit_forget_bias,
                  'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
                  'recurrent_regularizer': regularizers.serialize(self.recurrent_regularizer),
                  'bias_regularizer': regularizers.serialize(self.bias_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activity_regularizer),
                  'kernel_constraint': constraints.serialize(self.kernel_constraint),
                  'recurrent_constraint': constraints.serialize(self.recurrent_constraint),
                  'bias_constraint': constraints.serialize(self.bias_constraint),
                  'dropout': self.dropout,
                  'recurrent_dropout': self.recurrent_dropout}
        base_config = super(MultiplicativeLSTM, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:keras-contrib    作者:farizrahman4u    | 项目源码 | 文件源码
def get_config(self):
        config = {'filters': self.filters,
                  'kernel_size': self.kernel_size,
                  'kernel_initializer': initializers.serialize(self.kernel_initializer),
                  'activation': activations.serialize(self.activation),
                  'padding': self.padding,
                  'strides': self.strides,
                  'data_format': self.data_format,
                  'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
                  'bias_regularizer': regularizers.serialize(self.bias_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activity_regularizer),
                  'kernel_constraint': constraints.serialize(self.kernel_constraint),
                  'bias_constraint': constraints.serialize(self.bias_constraint),
                  'use_bias': self.use_bias}
        base_config = super(CosineConvolution2D, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {'filters_simple': self.filters_simple,
                  'filters_complex': self.filters_complex,
                  'kernel_size': self.kernel_size,
                  'data_format': self.data_format,
                  'kernel_initializer': initializers.serialize(self.kernel_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'activation': self.activation.__name__,
                  'dilation_rate': self.dilation_rate,
                  'padding': self.padding,
                  'strides': self.strides,
                  'kernel_regularizer': self.kernel_regularizer.get_config() if self.kernel_regularizer else None,
                  'bias_regularizer': self.bias_regularizer.get_config() if self.bias_regularizer else None,
                  'activity_regularizer': self.activity_regularizer.get_config() if self.activity_regularizer else None,
                  'kernel_constraint': self.kernel_constraint.get_config() if self.kernel_constraint else None,
                  'bias_constraint': self.bias_constraint.get_config() if self.bias_constraint else None,
                  'use_bias': self.use_bias}
        base_config = super(Convolution2DEnergy_Scatter, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))

# separate biases per channel
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {'filters_simple': self.filters_simple,
                  'filters_complex': self.filters_complex,
                  'kernel_size': self.kernel_size,
                  'data_format': self.data_format,
                  'kernel_initializer': initializers.serialize(self.kernel_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'activation': self.activation.__name__,
                  'dilation_rate': self.dilation_rate,
                  'padding': self.padding,
                  'strides': self.strides,
                  'kernel_regularizer': self.kernel_regularizer.get_config() if self.kernel_regularizer else None,
                  'bias_regularizer': self.bias_regularizer.get_config() if self.bias_regularizer else None,
                  'activity_regularizer': self.activity_regularizer.get_config() if self.activity_regularizer else None,
                  'kernel_constraint': self.W_constraint.get_config() if self.W_constraint else None,
                  'bias_constraint': self.bias_constraint.get_config() if self.bias_constraint else None,
                  'use_bias': self.bias}
        base_config = super(Convolution2DEnergy_Scatter2, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'rank': self.rank,
            'kernel_size': self.kernel_size,
            'padding': self.padding,
            'data_format': self.data_format,
            'kernel_initializer': initializers.serialize(self.kernel_initializer),
            'bias_initializer': initializers.serialize(self.kernel_initializer),
            'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
            'bias_regularizer': regularizers.serialize(self.bias_regularizer),
            'activity_regularizer': regularizers.serialize(self.activity_regularizer),
            'kernel_constraint': constraints.serialize(self.kernel_constraint),
            'bias_constraint': constraints.serialize(self.bias_constraint)
        }
        base_config = super(_ConvGDN, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {
                'alpha_pos_initializer': initializers.serialize(self.alpha_pos_initializer),
                'alpha_neg_initializer': initializers.serialize(self.alpha_neg_initializer),
                'beta_pos_initializer': initializers.serialize(self.beta_pos_initializer),
                'beta_neg_initializer': initializers.serialize(self.beta_neg_initializer),
                'rho_pos_initializer': initializers.serialize(self.rho_pos_initializer),
                'rho_neg_initializer': initializers.serialize(self.rho_neg_initializer),

                'alpha_pos_constraint': constraints.serialize(self.alpha_pos_constraint),
                'alpha_neg_constraint': constraints.serialize(self.alpha_neg_constraint),
                'beta_pos_constraint': constraints.serialize(self.beta_pos_constraint),
                'beta_neg_constraint': constraints.serialize(self.beta_neg_constraint),
                'rho_pos_constraint': constraints.serialize(self.rho_pos_constraint),
                'rho_neg_constraint': constraints.serialize(self.rho_neg_constraint),

                'alpha_pos_regularizer': regularizers.serialize(self.alpha_pos_regularizer),
                'alpha_neg_regularizer': regularizers.serialize(self.alpha_neg_regularizer),
                'beta_pos_regularizer': regularizers.serialize(self.beta_pos_regularizer),
                'beta_neg_regularizer': regularizers.serialize(self.beta_neg_regularizer),
                'rho_pos_regularizer': regularizers.serialize(self.rho_pos_regularizer),
                'rho_neg_regularizer': regularizers.serialize(self.rho_neg_regularizer),
        }
        base_config = super(PowerPReLU, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'filters': self.filters,
            'sum_axes': self.sum_axes,
            'filter_axes': self.filter_axes,
            'activation': activations.serialize(self.activation),
            'kernel_activation': activations.serialize(self.kernel_activation),
            'use_bias': self.use_bias,
            'kernel_initializer': initializers.serialize(self.kernel_initializer),
            'bias_initializer': initializers.serialize(self.kernel_initializer),
            'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
            'bias_regularizer': regularizers.serialize(self.bias_regularizer),
            'activity_regularizer': regularizers.serialize(self.activity_regularizer),
            'kernel_constraint': constraints.serialize(self.kernel_constraint),
            'bias_constraint': constraints.serialize(self.bias_constraint)
        }
        base_config = super(FilterDims, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'filters_simple': self.filters_simple,
            'filters_complex': self.filters_complex,
            'sum_axes': self.sum_axes,
            'filter_axes': self.filter_axes,
            'activation': activations.serialize(self.activation),
            'kernel_activation': activations.serialize(self.kernel_activation),
            'use_bias': self.use_bias,
            'kernel_initializer': initializers.serialize(self.kernel_initializer),
            'bias_initializer': initializers.serialize(self.kernel_initializer),
            'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
            'bias_regularizer': regularizers.serialize(self.bias_regularizer),
            'activity_regularizer': regularizers.serialize(self.activity_regularizer),
            'kernel_constraint': constraints.serialize(self.kernel_constraint),
            'bias_constraint': constraints.serialize(self.bias_constraint)
        }
        base_config = super(FilterDimsV1, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:Named-Entity-Recognition    作者:vishal1796    | 项目源码 | 文件源码
def get_config(self):
        config = {'units': self.units,
                  'learn_mode': self.learn_mode,
                  'test_mode': self.test_mode,
                  'use_boundary': self.use_boundary,
                  'use_bias': self.use_bias,
                  'sparse_target': self.sparse_target,
                  'kernel_initializer': initializers.serialize(self.kernel_initializer),
                  'chain_initializer': initializers.serialize(self.chain_initializer),
                  'boundary_initializer': initializers.serialize(self.boundary_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'activation': activations.serialize(self.activation),
                  'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
                  'chain_regularizer': regularizers.serialize(self.chain_regularizer),
                  'boundary_regularizer': regularizers.serialize(self.boundary_regularizer),
                  'bias_regularizer': regularizers.serialize(self.bias_regularizer),
                  'kernel_constraint': constraints.serialize(self.kernel_constraint),
                  'chain_constraint': constraints.serialize(self.chain_constraint),
                  'boundary_constraint': constraints.serialize(self.boundary_constraint),
                  'bias_constraint': constraints.serialize(self.bias_constraint),
                  'input_dim': self.input_dim,
                  'unroll': self.unroll}
        base_config = super(CRF, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:recurrentshop    作者:farizrahman4u    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'activation': activations.serialize(self.activation),
            'recurrent_activation': activations.serialize(self.recurrent_activation),
            'use_bias': self.use_bias,
            'kernel_initializer': initializers.serialize(self.kernel_initializer),
            'recurrent_initializer': initializers.serialize(self.recurrent_initializer),
            'bias_initializer': initializers.serialize(self.bias_initializer),
            'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
            'recurrent_regularizer': regularizers.serialize(self.recurrent_regularizer),
            'bias_regularizer': regularizers.serialize(self.bias_regularizer),
            'activity_regularizer': regularizers.serialize(self.activity_regularizer),
            'kernel_constraint': constraints.serialize(self.kernel_constraint),
            'recurrent_constraint': constraints.serialize(self.recurrent_constraint),
            'bias_constraint': constraints.serialize(self.bias_constraint)
        }
        base_config = super(ExtendedRNNCell, self).get_config()
        config.update(base_config)
        return config
项目:PhasedLSTM-Keras    作者:fferroni    | 项目源码 | 文件源码
def get_config(self):
        config = {'units': self.units,
                  'activation': activations.serialize(self.activation),
                  'recurrent_activation': activations.serialize(self.recurrent_activation),
                  'use_bias': self.use_bias,
                  'kernel_initializer': initializers.serialize(self.kernel_initializer),
                  'recurrent_initializer': initializers.serialize(self.recurrent_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'unit_forget_bias': self.unit_forget_bias,
                  'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
                  'recurrent_regularizer': regularizers.serialize(self.recurrent_regularizer),
                  'bias_regularizer': regularizers.serialize(self.bias_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activity_regularizer),
                  'kernel_constraint': constraints.serialize(self.kernel_constraint),
                  'recurrent_constraint': constraints.serialize(self.recurrent_constraint),
                  'bias_constraint': constraints.serialize(self.bias_constraint),
                  'dropout': self.dropout,
                  'recurrent_dropout': self.recurrent_dropout}
        base_config = super(PhasedLSTM, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:nn_playground    作者:DingKe    | 项目源码 | 文件源码
def get_config(self):
        config = {'epsilon': self.epsilon,
                  'axis': self.axis,
                  'gamma_init': initializers.serialize(self.gamma_init),
                  'beta_init': initializers.serialize(self.beta_init),
                  'gamma_regularizer': regularizers.serialize(self.gamma_regularizer),
                  'beta_regularizer': regularizers.serialize(self.gamma_regularizer)}
        base_config = super(LayerNormalization, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:nn_playground    作者:DingKe    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'ratio': self.ratio,
            'data_format': self.data_format,
            'use_bias': self.use_bias,
            'kernel_initializer': initializers.serialize(self.kernel_initializer),
            'bias_initializer': initializers.serialize(self.bias_initializer),
            'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
            'bias_regularizer': regularizers.serialize(self.bias_regularizer),
            'kernel_constraint': constraints.serialize(self.kernel_constraint),
            'bias_constraint': constraints.serialize(self.bias_constraint)
        }
        base_config = super(SE, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:MatchZoo    作者:faneshion    | 项目源码 | 文件源码
def get_config(self):
        config = {'output_dim': self.output_dim,
                'W_initializer':initializers.serialize(self.W_initializer),
                'b_initializer':initializers.serialize(self.W_initializer),
                'activation': activations.serialize(self.activation),
                'W_regularizer': self.W_regularizer.get_config() if self.W_regularizer else None,
                'b_regularizer': self.b_regularizer.get_config() if self.b_regularizer else None,
                'activity_regularizer': self.activity_regularizer.get_config() if self.activity_regularizer else None,
                'W_constraint': self.W_constraint.get_config() if self.W_constraint else None,
                'b_constraint': self.b_constraint.get_config() if self.b_constraint else None,
                'input_dim': self.input_dim}
        base_config = super(SparseFullyConnectedLayer, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:keras-text    作者:raghakot    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'kernel_initializer': initializers.serialize(self.kernel_initializer),
            'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
            'kernel_constraint': constraints.serialize(self.kernel_constraint),
            'bias_initializer': initializers.serialize(self.bias_initializer),
            'bias_regularizer': regularizers.serialize(self.bias_regularizer),
            'bias_constraint': constraints.serialize(self.bias_constraint),
            'context_initializer': initializers.serialize(self.context_initializer),
            'context_regularizer': regularizers.serialize(self.context_regularizer),
            'context_constraint': constraints.serialize(self.context_constraint)
        }
        base_config = super(AttentionLayer, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:deep-learning-models    作者:fchollet    | 项目源码 | 文件源码
def get_config(self):
        config = super(DepthwiseConv2D, self).get_config()
        config.pop('filters')
        config.pop('kernel_initializer')
        config.pop('kernel_regularizer')
        config.pop('kernel_constraint')
        config['depth_multiplier'] = self.depth_multiplier
        config['depthwise_initializer'] = initializers.serialize(self.depthwise_initializer)
        config['depthwise_regularizer'] = regularizers.serialize(self.depthwise_regularizer)
        config['depthwise_constraint'] = constraints.serialize(self.depthwise_constraint)
        return config
项目:MobileNetworks    作者:titu1994    | 项目源码 | 文件源码
def get_config(self):
        config = super(DepthwiseConv2D, self).get_config()
        config.pop('filters')
        config.pop('kernel_initializer')
        config.pop('kernel_regularizer')
        config.pop('kernel_constraint')
        config['depth_multiplier'] = self.depth_multiplier
        config['depthwise_initializer'] = initializers.serialize(self.depthwise_initializer)
        config['depthwise_regularizer'] = regularizers.serialize(self.depthwise_regularizer)
        config['depthwise_constraint'] = constraints.serialize(self.depthwise_constraint)
        return config
项目:MobileNetworks    作者:titu1994    | 项目源码 | 文件源码
def get_config(self):
        config = super(DepthwiseConv2D, self).get_config()
        config.pop('filters')
        config.pop('kernel_initializer')
        config.pop('kernel_regularizer')
        config.pop('kernel_constraint')
        config['depth_multiplier'] = self.depth_multiplier
        config['depthwise_initializer'] = initializers.serialize(self.depthwise_initializer)
        config['depthwise_regularizer'] = regularizers.serialize(self.depthwise_regularizer)
        config['depthwise_constraint'] = constraints.serialize(self.depthwise_constraint)
        return config
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {'filters_simple': self.filters_simple,
                  'filters_complex': self.filters_complex,
                  'filters_temporal': self.filters_temporal,
                  'spatial_kernel_size': self.spatial_kernel_size,
                  'temporal_frequencies': self.temporal_frequencies,
                  'temporal_frequencies_initial_max': self.temporal_frequencies_initial_max,
                  'temporal_frequencies_scaling': self.temporal_frequencies_scaling,
                  'strides': self.strides,
                  'padding': self.padding,
                  'data_format': self.data_format,
                  'dilation_rate': self.dilation_rate,
                  'activation': activations.serialize(self.activation),
                  'use_bias': self.use_bias,
                  'spatial_kernel_initializer': initializers.serialize(self.spatial_kernel_initializer),
                  'temporal_kernel_initializer': initializers.serialize(self.temporal_kernel_initializer),
                  'temporal_frequencies_initializer': initializers.serialize(self.temporal_frequencies_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'spatial_kernel_regularizer': regularizers.serialize(self.spatial_kernel_regularizer),
                  'temporal_kernel_regularizer': regularizers.serialize(self.temporal_kernel_regularizer),
                  'temporal_frequencies_regularizer': regularizers.serialize(self.temporal_frequencies_regularizer),
                  'bias_regularizer': regularizers.serialize(self.bias_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activity_regularizer),
                  'spatial_kernel_constraint': constraints.serialize(self.spatial_kernel_constraint),
                  'temporal_kernel_constraint': constraints.serialize(self.temporal_kernel_constraint),
                  'temporal_frequencies_constraint': constraints.serialize(self.temporal_frequencies_constraint),
                  'bias_constraint': constraints.serialize(self.bias_constraint)
                  }
        base_config = super(Convolution2DEnergy_TemporalBasis, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))

# separate temporal freqs per channel
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {'filters_simple': self.filters_simple,
                  'filters_complex': self.filters_complex,
                  'filters_temporal': self.filters_temporal,
                  'spatial_kernel_size': self.spatial_kernel_size,
                  'temporal_frequencies': self.temporal_frequencies,
                  'temporal_frequencies_initial_max': self.temporal_frequencies_initial_max,
                  'temporal_frequencies_scaling': self.temporal_frequencies_scaling,
                  'strides': self.strides,
                  'padding': self.padding,
                  'data_format': self.data_format,
                  'dilation_rate': self.dilation_rate,
                  'activation': activations.serialize(self.activation),
                  'use_bias': self.use_bias,
                  'spatial_kernel_initializer': initializers.serialize(self.spatial_kernel_initializer),
                  'temporal_kernel_initializer': initializers.serialize(self.temporal_kernel_initializer),
                  'temporal_frequencies_initializer': initializers.serialize(self.temporal_frequencies_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'spatial_kernel_regularizer': regularizers.serialize(self.spatial_kernel_regularizer),
                  'temporal_kernel_regularizer': regularizers.serialize(self.temporal_kernel_regularizer),
                  'temporal_frequencies_regularizer': regularizers.serialize(self.temporal_frequencies_regularizer),
                  'bias_regularizer': regularizers.serialize(self.bias_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activity_regularizer),
                  'spatial_kernel_constraint': constraints.serialize(self.spatial_kernel_constraint),
                  'temporal_kernel_constraint': constraints.serialize(self.temporal_kernel_constraint),
                  'temporal_frequencies_constraint': constraints.serialize(self.temporal_frequencies_constraint),
                  'bias_constraint': constraints.serialize(self.bias_constraint)
                  }
        base_config = super(Convolution2DEnergy_TemporalBasis2, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))

# separate biases per channel
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {'filters_simple': self.filters_simple,
                  'filters_complex': self.filters_complex,
                  'filters_temporal': self.filters_temporal,
                  'spatial_kernel_size': self.spatial_kernel_size,
                  'temporal_frequencies': self.temporal_frequencies,
                  'temporal_frequencies_initial_max': self.temporal_frequencies_initial_max,
                  'temporal_frequencies_scaling': self.temporal_frequencies_scaling,
                  'strides': self.strides,
                  'padding': self.padding,
                  'data_format': self.data_format,
                  'dilation_rate': self.dilation_rate,
                  'activation': activations.serialize(self.activation),
                  'use_bias': self.use_bias,
                  'spatial_kernel_initializer': initializers.serialize(self.spatial_kernel_initializer),
                  'temporal_kernel_initializer': initializers.serialize(self.temporal_kernel_initializer),
                  'temporal_frequencies_initializer': initializers.serialize(self.temporal_frequencies_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'spatial_kernel_regularizer': regularizers.serialize(self.spatial_kernel_regularizer),
                  'temporal_kernel_regularizer': regularizers.serialize(self.temporal_kernel_regularizer),
                  'temporal_frequencies_regularizer': regularizers.serialize(self.temporal_frequencies_regularizer),
                  'bias_regularizer': regularizers.serialize(self.bias_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activity_regularizer),
                  'spatial_kernel_constraint': constraints.serialize(self.spatial_kernel_constraint),
                  'temporal_kernel_constraint': constraints.serialize(self.temporal_kernel_constraint),
                  'temporal_frequencies_constraint': constraints.serialize(self.temporal_frequencies_constraint),
                  'bias_constraint': constraints.serialize(self.bias_constraint)
                  }
        base_config = super(Convolution2DEnergy_TemporalBasis3, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'units': self.units,
            'kernel_initializer': initializers.serialize(self.kernel_initializer),
            'k_initializer': initializers.serialize(self.k_initializer),
            'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
            'k_regularizer': regularizers.serialize(self.k_regularizer),
            'activity_regularizer': regularizers.serialize(self.activity_regularizer),
            'kernel_constraint': constraints.serialize(self.kernel_constraint),
            'k_constraint': constraints.serialize(self.k_constraint)
        }
        base_config = super(Conv2DSoftMinMax, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'alpha_initializer': initializers.serialize(self.alpha_initializer),
            'alpha_regularizer': regularizers.serialize(self.alpha_regularizer),
            'alpha_constraint': constraints.serialize(self.alpha_constraint),
            'beta_initializer': initializers.serialize(self.beta_initializer),
            'beta_regularizer': regularizers.serialize(self.beta_regularizer),
            'beta_constraint': constraints.serialize(self.beta_constraint),
            'shared_axes': self.shared_axes
        }
        base_config = super(ParametricSoftplus, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {'filters_simple': self.filters_simple,
                  'filters_complex': self.filters_complex,
                  'filters_temporal': self.filters_temporal,
                  'spatial_kernel_size': self.spatial_kernel_size,
                  'temporal_frequencies': self.temporal_frequencies,
                  'temporal_frequencies_initial_max': self.temporal_frequencies_initial_max,
                  'temporal_frequencies_scaling': self.temporal_frequencies_scaling,
                  'strides': self.strides,
                  'padding': self.padding,
                  'data_format': self.data_format,
                  'dilation_rate': self.dilation_rate,
                  'activation': activations.serialize(self.activation),
                  'use_bias': self.use_bias,
                  'spatial_kernel_initializer': initializers.serialize(self.spatial_kernel_initializer),
                  'temporal_kernel_initializer': initializers.serialize(self.temporal_kernel_initializer),
                  'temporal_frequencies_initializer': initializers.serialize(self.temporal_frequencies_initializer),
                  'bias_initializer': initializers.serialize(self.bias_initializer),
                  'spatial_kernel_regularizer': regularizers.serialize(self.spatial_kernel_regularizer),
                  'temporal_kernel_regularizer': regularizers.serialize(self.temporal_kernel_regularizer),
                  'temporal_frequencies_regularizer': regularizers.serialize(self.temporal_frequencies_regularizer),
                  'bias_regularizer': regularizers.serialize(self.bias_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activity_regularizer),
                  'spatial_kernel_constraint': constraints.serialize(self.spatial_kernel_constraint),
                  'temporal_kernel_constraint': constraints.serialize(self.temporal_kernel_constraint),
                  'temporal_frequencies_constraint': constraints.serialize(self.temporal_frequencies_constraint),
                  'bias_constraint': constraints.serialize(self.bias_constraint),
                  'neurons': self.neurons,
                  'gauss_scale': self.gauss_scale,
                  'centers_initializer': initializers.serialize(self.centers_initializer),
                  'stds_initializer': initializers.serialize(self.stds_initializer),
                  'centers_regularizer': regularizers.serialize(self.centers_regularizer),
                  'stds_regularizer': regularizers.serialize(self.stds_regularizer),
                  'centers_constraint': constraints.serialize(self.centers_constraint),
                  'stds_constraint': constraints.serialize(self.stds_constraint),
                  }
        base_config = super(Convolution2DEnergy_TemporalBasis_GaussianRF, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {'quadratic_filters_ex': self.quadratic_filters_ex,
                  'quadratic_filters_sup': self.quadratic_filters_sup,
                  'W_quad_ex_initializer': initializers.serialize(self.W_quad_ex_initializer),
                  'W_quad_ex_regularizer': regularizers.serialize(self.W_quad_ex_regularizer),
                  'W_quad_ex_constraint': constraints.serialize(self.W_quad_ex_constraint),
                  'W_quad_sup_initializer': initializers.serialize(self.W_quad_sup_initializer),
                  'W_quad_sup_regularizer': regularizers.serialize(self.W_quad_sup_regularizer),
                  'W_lin_regularizer': constraints.serialize(self.W_lin_regularizer),
                  'W_lin_initializer': initializers.serialize(self.W_lin_initializer),
                  'W_quad_sup_regularizer': regularizers.serialize(self.W_quad_sup_regularizer),
                  'W_lin_constraint': constraints.serialize(self.W_lin_constraint),
                  }
        base_config = super(RustSTC, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'bias_initializer': initializers.serialize(self.bias_initializer),
            'bias_regularizer': regularizers.serialize(self.bias_regularizer),
            'bias_constraint': constraints.serialize(self.bias_constraint),
            }
        base_config = super(EminusS, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'units': self.units,
            'kernel_initializer': initializers.serialize(self.kernel_initializer),
            'kernel_regularizer': regularizers.serialize(self.kernel_regularizer),
            'activity_regularizer': regularizers.serialize(self.activity_regularizer),
            'kernel_constraint': constraints.serialize(self.kernel_constraint)
        }
        base_config = super(WeightedMean, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:kchar    作者:jarfo    | 项目源码 | 文件源码
def get_config(self):
        config = {'init': initializers.serialize(self.init),
                  'activation': activations.serialize(self.activation),
                  'W_regularizer': regularizers.serialize(self.W_regularizer),
                  'b_regularizer': regularizers.serialize(self.b_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activity_regularizer),
                  'W_constraint': constraints.serialize(self.W_constraint),
                  'b_constraint': constraints.serialize(self.b_constraint),
                  'bias': self.bias,
                  'input_dim': self.input_dim}
        base_config = super(Highway, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:anago    作者:Hironsan    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'init': initializers.serialize(self.init),
            'U_regularizer': regularizers.serialize(self.U_regularizer),
            'b_start_regularizer': regularizers.serialize(self.b_start_regularizer),
            'b_end_regularizer': regularizers.serialize(self.b_end_regularizer),
            'U_constraint': constraints.serialize(self.U_constraint),
            'b_start_constraint': constraints.serialize(self.b_start_constraint),
            'b_end_constraint': constraints.serialize(self.b_end_constraint)
        }
        base_config = super(ChainCRF, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:CIAN    作者:yanghanxy    | 项目源码 | 文件源码
def get_config(self):
        config = {'init': initializers.serialize(self.init),
                  'activation': activations.serialize(self.activation),
                  'W_regularizer': regularizers.serialize(self.W_regularizer),
                  'b_regularizer': regularizers.serialize(self.b_regularizer),
                  'activity_regularizer': regularizers.serialize(self.activity_regularizer),
                  'W_constraint': constraints.serialize(self.W_constraint),
                  'b_constraint': constraints.serialize(self.b_constraint),
                  'bias': self.bias,
                  'input_dim': self.input_dim}
        base_config = super(Highway, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:CIAN    作者:yanghanxy    | 项目源码 | 文件源码
def get_config(self):
        config = {'W_regularizer': regularizers.serialize(self.W_regularizer),
                  'u_regularizer': regularizers.serialize(self.u_regularizer),
                  'b_regularizer': regularizers.serialize(self.b_regularizer),
                  'W_constraint': constraints.serialize(self.W_constraint),
                  'u_constraint': constraints.serialize(self.u_constraint),
                  'b_constraint': constraints.serialize(self.b_constraint),
                  'W_dropout': self.W_dropout,
                  'u_dropout': self.u_dropout,
                  'bias': self.bias}
        base_config = super(AttentionWithContext, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))
项目:R-NET-in-Keras    作者:YerevaNN    | 项目源码 | 文件源码
def get_config(self):
        config = {
            'size': self.size,
            'initializer': initializers.serialize(self.initializer),
            'regularizer': regularizers.serialize(self.regularizer)
        }
        base_config = Layer.get_config(self)
        return dict(list(base_config.items()) + list(config.items()))
项目:recurrentshop    作者:farizrahman4u    | 项目源码 | 文件源码
def _serialize_state_initializer(self):
        si = self.state_initializer
        if si is None:
            return None
        elif type(si) is list:
            return list(map(initializers.serialize, si))
        else:
            return initializers.serialize(si)
项目:recurrentshop    作者:farizrahman4u    | 项目源码 | 文件源码
def get_config(self):
        config = {'cells': list(map(serialize, self.cells)),
                  'decode': self.decode,
                  'output_length': self.output_length,
                  'readout': self.readout,
                  'teacher_force': self.teacher_force,
                  'return_states': self.return_states,
                  'state_sync': self.state_sync,
                  'state_initializer': self._serialize_state_initializer(),
                  'readout_activation': activations.serialize(self.readout_activation)}
        base_config = super(RecurrentModel, self).get_config()
        config.update(base_config)
        return config
项目:yolov2    作者:datlife    | 项目源码 | 文件源码
def get_config(self):
        config = super(DepthwiseConv2D, self).get_config()
        config.pop('filters')
        config.pop('kernel_initializer')
        config.pop('kernel_regularizer')
        config.pop('kernel_constraint')
        config['depth_multiplier'] = self.depth_multiplier
        config['depthwise_initializer'] = initializers.serialize(self.depthwise_initializer)
        config['depthwise_regularizer'] = regularizers.serialize(self.depthwise_regularizer)
        config['depthwise_constraint'] = constraints.serialize(self.depthwise_constraint)
        return config
项目:kfs    作者:the-moliver    | 项目源码 | 文件源码
def get_config(self):
        config = {'filters_simple': self.filters_simple,
                  'filters_complex': self.filters_complex,
                  'filters_temporal': self.filters_temporal,
                  'spatial_kernel_size': self.spatial_kernel_size,
                  'temporal_frequencies': self.temporal_frequencies,
                  'temporal_frequencies_initial_max':
                                        self.temporal_frequencies_initial_max,
                  'temporal_frequencies_scaling':
                                        self.temporal_frequencies_scaling,
                  'strides': self.strides,
                  'padding': self.padding,
                  'data_format': self.data_format,
                  'dilation_rate': self.dilation_rate,
                  'activation': activations.serialize(self.activation),
                  'use_bias': self.use_bias,
                  'spatial_kernel_initializer': 
                        initializers.serialize(
                                            self.spatial_kernel_initializer),
                  'temporal_kernel_initializer':
                        initializers.serialize(
                                            self.temporal_kernel_initializer),
                  'temporal_frequencies_initializer':
                        initializers.serialize(
                                    self.temporal_frequencies_initializer),
                  'bias_initializer': 
                        initializers.serialize(self.bias_initializer),
                  'spatial_kernel_regularizer':
                        regularizers.serialize(
                            self.spatial_kernel_regularizer),
                  'temporal_kernel_regularizer':
                        regularizers.serialize(
                            self.temporal_kernel_regularizer),
                  'temporal_frequencies_regularizer':
                        regularizers.serialize(
                            self.temporal_frequencies_regularizer),
                  'bias_regularizer':
                        regularizers.serialize(self.bias_regularizer),
                  'activity_regularizer':
                        regularizers.serialize(self.activity_regularizer),
                  'spatial_kernel_constraint':
                        constraints.serialize(self.spatial_kernel_constraint),
                  'temporal_kernel_constraint':
                        constraints.serialize(self.temporal_kernel_constraint),
                  'temporal_frequencies_constraint':
                        constraints.serialize(
                            self.temporal_frequencies_constraint),
                  'bias_constraint': 
                        constraints.serialize(self.bias_constraint)
                  }
        base_config = super(
                Convolution2DEnergy_TemporalCorrelation, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))