Example #1
0
 def get_config(self):
   config = {
       'axis':
           self.axis,
       'momentum':
           self.momentum,
       'epsilon':
           self.epsilon,
       'center':
           self.center,
       'scale':
           self.scale,
       'beta_initializer':
           initializers.serialize(self.beta_initializer),
       'gamma_initializer':
           initializers.serialize(self.gamma_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),
       'beta_constraint':
           constraints.serialize(self.beta_constraint),
       'gamma_constraint':
           constraints.serialize(self.gamma_constraint)
   }
   base_config = super(BatchNormalization, self).get_config()
   return dict(list(base_config.items()) + list(config.items()))
Example #2
0
 def get_config(self):
     config = {
         'axis':
         self.axis,
         'momentum':
         self.momentum,
         'epsilon':
         self.epsilon,
         'center':
         self.center,
         'scale':
         self.scale,
         'beta_initializer':
         initializers.serialize(self.beta_initializer),
         'gamma_initializer':
         initializers.serialize(self.gamma_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),
         'beta_constraint':
         constraints.serialize(self.beta_constraint),
         'gamma_constraint':
         constraints.serialize(self.gamma_constraint)
     }
     base_config = super(BatchNormalization, self).get_config()
     return dict(list(base_config.items()) + list(config.items()))
Example #3
0
 def get_config(self):
   config = {
       'units':
           self.units,
       '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(Dense, self).get_config()
   return dict(list(base_config.items()) + list(config.items()))
Example #4
0
 def get_config(self):
   config = {
       'units':
           self.units,
       '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(Dense, self).get_config()
   return dict(list(base_config.items()) + list(config.items()))
 def get_config(self):
   config = {
       'filters':
           self.filters,
       'kernel_size':
           self.kernel_size,
       'strides':
           self.strides,
       'padding':
           self.padding,
       'data_format':
           self.data_format,
       '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(LocallyConnected2D, self).get_config()
   return dict(list(base_config.items()) + list(config.items()))
Example #6
0
 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(LSTM, self).get_config()
   return dict(list(base_config.items()) + list(config.items()))
Example #7
0
 def get_config(self):
   config = {
       'units':
           self.units,
       '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),
       '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(SimpleRNN, self).get_config()
   return dict(list(base_config.items()) + list(config.items()))
Example #8
0
 def get_config(self):
     config = {
         'output_dim':
         self.output_dim,
         'init':
         initializers.serialize(self.init),
         'nb_feature':
         self.nb_feature,
         '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(MaxoutDense, self).get_config()
     return dict(list(base_config.items()) + list(config.items()))
Example #9
0
 def get_config(self):
   config = {
       'filters':
           self.filters,
       'kernel_size':
           self.kernel_size,
       'strides':
           self.strides,
       'padding':
           self.padding,
       'data_format':
           self.data_format,
       '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(LocallyConnected2D, self).get_config()
   return dict(list(base_config.items()) + list(config.items()))
 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),
       'shared_axes': self.shared_axes
   }
   base_config = super(PReLU, self).get_config()
   return dict(list(base_config.items()) + list(config.items()))
Example #11
0
 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),
       'shared_axes': self.shared_axes
   }
   base_config = super(PReLU, self).get_config()
   return dict(list(base_config.items()) + list(config.items()))
Example #12
0
 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
Example #13
0
 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
Example #14
0
 def get_config(self):
   config = {
       'input_dim':
           self.input_dim,
       'output_dim':
           self.output_dim,
       'embeddings_initializer':
           initializers.serialize(self.embeddings_initializer),
       'embeddings_regularizer':
           regularizers.serialize(self.embeddings_regularizer),
       'activity_regularizer':
           regularizers.serialize(self.activity_regularizer),
       'embeddings_constraint':
           constraints.serialize(self.embeddings_constraint),
       'mask_zero':
           self.mask_zero,
       'input_length':
           self.input_length
   }
   base_config = super(Embedding, self).get_config()
   return dict(list(base_config.items()) + list(config.items()))
Example #15
0
 def get_config(self):
     config = {
         'input_dim':
         self.input_dim,
         'output_dim':
         self.output_dim,
         'embeddings_initializer':
         initializers.serialize(self.embeddings_initializer),
         'embeddings_regularizer':
         regularizers.serialize(self.embeddings_regularizer),
         'activity_regularizer':
         regularizers.serialize(self.activity_regularizer),
         'embeddings_constraint':
         constraints.serialize(self.embeddings_constraint),
         'mask_zero':
         self.mask_zero,
         'input_length':
         self.input_length
     }
     base_config = super(Embedding, self).get_config()
     return dict(list(base_config.items()) + list(config.items()))