本文整理汇总了Python中keras.initializers.serialize方法的典型用法代码示例。如果您正苦于以下问题:Python initializers.serialize方法的具体用法?Python initializers.serialize怎么用?Python initializers.serialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类keras.initializers
的用法示例。
在下文中一共展示了initializers.serialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
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
# Tracker
示例2: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
config = {
'groups': self.groups,
'axis': self.axis,
'epsilon': self.epsilon,
'center': self.center,
'scale': self.scale,
'beta_initializer': initializers.serialize(self.beta_initializer),
'gamma_initializer': initializers.serialize(self.gamma_initializer),
'beta_regularizer': regularizers.serialize(self.beta_regularizer),
'gamma_regularizer': regularizers.serialize(self.gamma_regularizer),
'beta_constraint': constraints.serialize(self.beta_constraint),
'gamma_constraint': constraints.serialize(self.gamma_constraint)
}
base_config = super(GroupNormalization, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例3: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
if self.kernel_initializer in {'complex'}:
ki = self.kernel_initializer
else:
ki = initializers.serialize(self.kernel_initializer)
config = {
'units': self.units,
'activation': activations.serialize(self.activation),
'use_bias': self.use_bias,
'init_criterion': self.init_criterion,
'kernel_initializer': ki,
'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),
'seed': self.seed,
}
base_config = super(ComplexDense, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例4: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
config = {
'axis': self.axis,
'epsilon': self.epsilon,
'center': self.center,
'scale': self.scale,
'beta_initializer': initializers.serialize(self.beta_initializer),
'gamma_diag_initializer': initializers.serialize(self.gamma_diag_initializer),
'gamma_off_initializer': initializers.serialize(self.gamma_off_initializer),
'beta_regularizer': regularizers.serialize(self.beta_regularizer),
'gamma_diag_regularizer': regularizers.serialize(self.gamma_diag_regularizer),
'gamma_off_regularizer': regularizers.serialize(self.gamma_off_regularizer),
'beta_constraint': constraints.serialize(self.beta_constraint),
'gamma_diag_constraint': constraints.serialize(self.gamma_diag_constraint),
'gamma_off_constraint': constraints.serialize(self.gamma_off_constraint),
}
base_config = super(ComplexLayerNorm, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例5: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
config = {
'axis': self.axis,
'momentum': self.momentum,
'epsilon': self.epsilon,
'center': self.center,
'scale': self.scale,
'beta_initializer': sanitizedInitSer(self.beta_initializer),
'gamma_diag_initializer': sanitizedInitSer(self.gamma_diag_initializer),
'gamma_off_initializer': sanitizedInitSer(self.gamma_off_initializer),
'moving_mean_initializer': sanitizedInitSer(self.moving_mean_initializer),
'moving_variance_initializer': sanitizedInitSer(self.moving_variance_initializer),
'moving_covariance_initializer': sanitizedInitSer(self.moving_covariance_initializer),
'beta_regularizer': regularizers.serialize(self.beta_regularizer),
'gamma_diag_regularizer': regularizers.serialize(self.gamma_diag_regularizer),
'gamma_off_regularizer': regularizers.serialize(self.gamma_off_regularizer),
'beta_constraint': constraints .serialize(self.beta_constraint),
'gamma_diag_constraint': constraints .serialize(self.gamma_diag_constraint),
'gamma_off_constraint': constraints .serialize(self.gamma_off_constraint),
}
base_config = super(ComplexBatchNormalization, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例6: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
config = {'units': self.units,
'projection_units': self.projection_units,
'activation': activations.serialize(self.activation),
'recurrent_activation': activations.serialize(self.recurrent_activation),
'projection_activation': activations.serialize(self.projection_activation),
'use_bias': self.use_bias,
'kernel_initializer': initializers.serialize(self.kernel_initializer),
'recurrent_initializer': initializers.serialize(self.recurrent_initializer),
'projection_initializer': initializers.serialize(self.projection_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),
'projection_regularizer': regularizers.serialize(self.projection_regularizer),
'bias_regularizer': regularizers.serialize(self.bias_regularizer),
'kernel_constraint': constraints.serialize(self.kernel_constraint),
'recurrent_constraint': constraints.serialize(self.recurrent_constraint),
'projection_constraint': constraints.serialize(self.projection_constraint),
'bias_constraint': constraints.serialize(self.bias_constraint),
'dropout': self.dropout,
'recurrent_dropout': self.recurrent_dropout,
'implementation': self.implementation}
base_config = super(NASCell, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例7: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
config = {
'rank': self.rank,
'filters': self.filters,
'kernel_size': self.kernel_size,
'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,
'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)
}
base_config = super(_Conv, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例8: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
config = {'epsilon': self.epsilon,
'axis': self.axis,
'center': self.center,
'scale': self.scale,
'momentum': self.momentum,
'gamma_regularizer': initializers.serialize(self.gamma_regularizer),
'beta_regularizer': initializers.serialize(self.beta_regularizer),
'moving_mean_initializer': initializers.serialize(self.moving_mean_initializer),
'moving_variance_initializer': initializers.serialize(self.moving_variance_initializer),
'beta_constraint': constraints.serialize(self.beta_constraint),
'gamma_constraint': constraints.serialize(self.gamma_constraint),
'r_max_value': self.r_max_value,
'd_max_value': self.d_max_value,
't_delta': self.t_delta}
base_config = super(BatchRenormalization, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例9: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
if self.kernel_initializer == 'quaternion':
ki = self.kernel_init
else:
ki = initializers.serialize(self.kernel_initializer)
config = {
'units': self.units,
'activation': activations.serialize(self.activation),
'use_bias': self.use_bias,
'init_criterion': self.init_criterion,
'kernel_initializer': ki,
'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),
'seed': self.seed,
}
base_config = super(QuaternionDense, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
开发者ID:Orkis-Research,项目名称:Quaternion-Convolutional-Neural-Networks-for-End-to-End-Automatic-Speech-Recognition,代码行数:23,代码来源:dense.py
示例10: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
config = {
'axis': self.axis,
'epsilon': self.epsilon,
'momentum': self.momentum,
'center': self.center,
'scale': self.scale,
'beta_initializer': initializers.serialize(self.beta_initializer),
'gamma_initializer': initializers.serialize(self.gamma_initializer),
'mean_weights_initializer': initializers.serialize(self.mean_weights_initializer),
'variance_weights_initializer': initializers.serialize(self.variance_weights_initializer),
'moving_mean_initializer': initializers.serialize(self.moving_mean_initializer),
'moving_variance_initializer': initializers.serialize(self.moving_variance_initializer),
'beta_regularizer': regularizers.serialize(self.beta_regularizer),
'gamma_regularizer': regularizers.serialize(self.gamma_regularizer),
'mean_weights_regularizer': regularizers.serialize(self.mean_weights_regularizer),
'variance_weights_regularizer': regularizers.serialize(self.variance_weights_regularizer),
'beta_constraint': constraints.serialize(self.beta_constraint),
'gamma_constraint': constraints.serialize(self.gamma_constraint),
'mean_weights_constraints': constraints.serialize(self.mean_weights_constraints),
'variance_weights_constraints': constraints.serialize(self.variance_weights_constraints),
}
base_config = super(SwitchNormalization, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例11: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
config = {'units': self.units,
'recurrent_clip_min': self.recurrent_clip_min,
'recurrent_clip_max': self.recurrent_clip_max,
'activation': activations.serialize(self.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),
'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,
'implementation': self.implementation}
base_config = super(IndRNNCell, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例12: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
config = {'units': self.units,
'depth': self.depth,
'activation': activations.serialize(self.activation),
'recurrent_activation': activations.serialize(self.recurrent_activation),
'cell_activation': activations.serialize(self.cell_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),
'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,
'implementation': self.implementation}
base_config = super(NestedLSTMCell, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例13: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
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()))
示例14: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
def get_config(self):
config = {
'epsilon': self.epsilon,
'axis': self.axis,
'center': self.center,
'scale': self.scale,
'momentum': self.momentum,
'gamma_regularizer': initializers.serialize(self.gamma_regularizer),
'beta_regularizer': initializers.serialize(self.beta_regularizer),
'moving_mean_initializer': initializers.serialize(
self.moving_mean_initializer),
'moving_variance_initializer': initializers.serialize(
self.moving_variance_initializer),
'beta_constraint': constraints.serialize(self.beta_constraint),
'gamma_constraint': constraints.serialize(self.gamma_constraint),
'r_max_value': self.r_max_value,
'd_max_value': self.d_max_value,
't_delta': self.t_delta
}
base_config = super(BatchRenormalization, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
示例15: get_config
# 需要导入模块: from keras import initializers [as 别名]
# 或者: from keras.initializers import serialize [as 别名]
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()))