本文整理匯總了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()))