コード例 #1
0
ファイル: convolutional.py プロジェクト: gridl/polyaxon-lib
 def __init__(self,
              filters,
              kernel_size,
              strides=(1, 1),
              padding='valid',
              data_format=None,
              dilation_rate=(1, 1),
              activation=None,
              use_bias=True,
              kernel_initializer='glorot_uniform',
              bias_initializer='zeros',
              kernel_regularizer=None,
              bias_regularizer=None,
              activity_regularizer=None,
              kernel_constraint=None,
              bias_constraint=None,
              **kwargs):
     super(Conv2D, self).__init__(
         filters=filters,
         kernel_size=kernel_size,
         strides=strides,
         padding=padding,
         data_format=data_format,
         dilation_rate=dilation_rate,
         activation=getters.get_activation(activation)
         if activation else activation,
         use_bias=use_bias,
         kernel_initializer=getters.get_initializer(kernel_initializer),
         bias_initializer=getters.get_initializer(bias_initializer),
         kernel_regularizer=getters.get_regularizer(kernel_regularizer),
         bias_regularizer=getters.get_regularizer(bias_regularizer),
         activity_regularizer=getters.get_regularizer(activity_regularizer),
         kernel_constraint=getters.get_constraint(kernel_constraint),
         bias_constraint=getters.get_constraint(bias_constraint),
         **kwargs)
コード例 #2
0
ファイル: core.py プロジェクト: gridl/polyaxon-lib
 def __init__(self,
              units,
              activation=None,
              use_bias=True,
              kernel_initializer='glorot_uniform',
              bias_initializer='zeros',
              kernel_regularizer=None,
              bias_regularizer=None,
              activity_regularizer=None,
              kernel_constraint=None,
              bias_constraint=None,
              **kwargs):
     super(Dense, self).__init__(
         units,
         activation=getters.get_activation(activation)
         if activation else activation,
         use_bias=use_bias,
         kernel_initializer=getters.get_initializer(kernel_initializer),
         bias_initializer=getters.get_initializer(bias_initializer),
         kernel_regularizer=getters.get_regularizer(kernel_regularizer),
         bias_regularizer=getters.get_regularizer(bias_regularizer),
         activity_regularizer=getters.get_regularizer(activity_regularizer),
         kernel_constraint=getters.get_constraint(kernel_constraint),
         bias_constraint=getters.get_constraint(bias_constraint),
         **kwargs)
コード例 #3
0
ファイル: recurrent.py プロジェクト: gridl/polyaxon-lib
 def __init__(self,
              units,
              activation='tanh',
              use_bias=True,
              kernel_initializer='glorot_uniform',
              recurrent_initializer='orthogonal',
              bias_initializer='zeros',
              kernel_regularizer=None,
              recurrent_regularizer=None,
              bias_regularizer=None,
              activity_regularizer=None,
              kernel_constraint=None,
              recurrent_constraint=None,
              bias_constraint=None,
              dropout=0.,
              recurrent_dropout=0.,
              **kwargs):
     super(SimpleRNN, self).__init__(
         units=units,
         activation=getters.get_activation(activation),
         use_bias=use_bias,
         kernel_initializer=getters.get_initializer(kernel_initializer),
         recurrent_initializer=getters.get_initializer(recurrent_initializer),
         bias_initializer=getters.get_initializer(bias_initializer),
         kernel_regularizer=getters.get_regularizer(kernel_regularizer),
         recurrent_regularizer=getters.get_regularizer(recurrent_regularizer),
         bias_regularizer=getters.get_regularizer(bias_regularizer),
         activity_regularizer=getters.get_regularizer(activity_regularizer),
         kernel_constraint=getters.get_constraint(kernel_constraint),
         recurrent_constraint=getters.get_constraint(recurrent_constraint),
         bias_constraint=getters.get_constraint(bias_constraint),
         dropout=dropout,
         recurrent_dropout=recurrent_dropout,
         **kwargs)
コード例 #4
0
ファイル: convolutional.py プロジェクト: gridl/polyaxon-lib
 def __init__(self,
              filters,
              kernel_size,
              strides=(1, 1),
              padding='valid',
              data_format=None,
              depth_multiplier=1,
              activation=None,
              use_bias=True,
              depthwise_initializer='glorot_uniform',
              pointwise_initializer='glorot_uniform',
              bias_initializer='zeros',
              depthwise_regularizer=None,
              pointwise_regularizer=None,
              bias_regularizer=None,
              activity_regularizer=None,
              depthwise_constraint=None,
              pointwise_constraint=None,
              bias_constraint=None,
              **kwargs):
     super(SeparableConv2D, self).__init__(
         filters=filters,
         kernel_size=kernel_size,
         strides=strides,
         padding=padding,
         data_format=data_format,
         depth_multiplier=depth_multiplier,
         activation=getters.get_activation(activation),
         use_bias=use_bias,
         depthwise_initializer=getters.get_initializer(
             depthwise_initializer),
         pointwise_initializer=getters.get_initializer(
             pointwise_initializer),
         bias_initializer=getters.get_initializer(bias_initializer),
         depthwise_regularizer=getters.get_regularizer(
             depthwise_regularizer),
         pointwise_regularizer=getters.get_regularizer(
             pointwise_regularizer),
         bias_regularizer=getters.get_regularizer(bias_regularizer),
         activity_regularizer=getters.get_regularizer(activity_regularizer),
         depthwise_constraint=getters.get_constraint(depthwise_constraint),
         pointwise_constraint=getters.get_constraint(pointwise_constraint),
         bias_constraint=getters.get_constraint(bias_constraint),
         **kwargs)
コード例 #5
0
 def __init__(self,
              input_dim,
              output_dim,
              embeddings_initializer='uniform',
              embeddings_regularizer=None,
              activity_regularizer=None,
              embeddings_constraint=None,
              mask_zero=False,
              input_length=None,
              **kwargs):
     super(Embedding, self).__init__(
         input_dim=input_dim,
         output_dim=output_dim,
         embeddings_initializer=getters.get_initializer(
             embeddings_initializer),
         embeddings_regularizer=getters.get_regularizer(
             embeddings_regularizer),
         activity_regularizer=getters.get_regularizer(activity_regularizer),
         embeddings_constraint=getters.get_constraint(
             embeddings_constraint),
         mask_zero=mask_zero,
         input_length=input_length,
         **kwargs)