####
model = Sequential()
model.add(Dense(32, input_shape=(16,)))
model.add(Conv2D(64 ,
(3, 3) ,
input_shape = (3, 32, 32),
padding = 'same', ))
model.add(LSTM(32))
####
keras.engine.input_layer.Input()
keras.layers.Dense(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 )
keras.layers.Activation(activation)
keras.layers.Dropout(rate, noise_shape=None, seed=None)
keras.layers.Flatten(data_format=None)
keras.layers.Reshape(target_shape)
keras.layers.Permute(dims)
keras.layers.RepeatVector(n)
keras.layers.Lambda(function, output_shape=None, mask=None, arguments=None)
keras.layers.ActivityRegularization(l1=0.0, l2=0.0)
keras.layers.Masking(mask_value=0.0)
keras.layers.SpatialDropout1D(rate)
keras.layers.SpatialDropout2D(rate, data_format=None)
keras.layers.SpatialDropout3D(rate, data_format=None)
keras.layers.Conv1D(filters ,
kernel_size ,
strides = 1 ,
padding = 'valid' ,
data_format = 'channels_last' ,
dilation_rate = 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 )
keras.layers.Conv2D(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 )
keras.layers.SeparableConv1D(filters,
kernel_size ,
strides = 1 ,
padding = 'valid' ,
data_format = 'channels_last' ,
dilation_rate = 1 ,
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 )
keras.layers.SeparableConv2D(filters,
kernel_size ,
strides = (1, 1) ,
padding = 'valid' ,
data_format = None ,
dilation_rate = (1, 1) ,
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 )
keras.layers.DepthwiseConv2D(kernel_size ,
strides = (1, 1) ,
padding = 'valid' ,
depth_multiplier = 1 ,
data_format = None ,
activation = None ,
use_bias = True ,
depthwise_initializer = 'glorot_uniform',
bias_initializer = 'zeros' ,
depthwise_regularizer = None ,
bias_regularizer = None ,
activity_regularizer = None ,
depthwise_constraint = None ,
bias_constraint = None )
keras.layers.Conv2DTranspose(filters ,
kernel_size ,
strides = (1, 1) ,
padding = 'valid' ,
output_padding = None ,
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 )
keras.layers.Conv3D(filters,
kernel_size ,
strides = (1, 1, 1) ,
padding = 'valid' ,
data_format = None ,
dilation_rate = (1, 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 )
keras.layers.Conv3DTranspose(filters,
kernel_size ,
strides = (1, 1, 1) ,
padding = 'valid' ,
output_padding = None ,
data_format = None ,
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 )
keras.layers.Cropping1D(cropping=(1, 1) )
keras.layers.Cropping2D(cropping=((0, 0), (0, 0) ), data_format=None)
keras.layers.Cropping3D(cropping=((1, 1), (1, 1), (1, 1)), data_format=None)
keras.layers.UpSampling1D(size=2)
keras.layers.UpSampling2D(size = (2, 2) ,
data_format = None ,
interpolation = 'nearest')
keras.layers.UpSampling3D(size=(2, 2, 2), data_format=None)
keras.layers.ZeroPadding1D(padding=1)
keras.layers.ZeroPadding2D(padding=(1, 1), data_format=None)
keras.layers.ZeroPadding3D(padding=(1, 1, 1), data_format=None)
keras.layers.MaxPooling1D(pool_size = 2 ,
strides = None ,
padding = 'valid' ,
data_format = 'channels_last')
keras.layers.MaxPooling2D(pool_size = (2, 2) ,
strides = None ,
padding = 'valid',
data_format = None )
keras.layers.MaxPooling3D(pool_size = (2, 2, 2),
strides = None ,
padding = 'valid' ,
data_format = None )
keras.layers.AveragePooling1D(pool_size = 2 ,
strides = None ,
padding = 'valid' ,
data_format = 'channels_last')
keras.layers.AveragePooling2D(pool_size = (2, 2) ,
strides = None ,
padding = 'valid',
data_format = None )
keras.layers.AveragePooling3D(pool_size = (2, 2, 2),
strides = None ,
padding = 'valid' ,
data_format = None )
keras.layers.GlobalMaxPooling1D (data_format = 'channels_last')
keras.layers.GlobalAveragePooling1D(data_format = 'channels_last')
keras.layers.GlobalMaxPooling2D (data_format = None )
keras.layers.GlobalAveragePooling2D(data_format = None )
keras.layers.GlobalMaxPooling3D (data_format = None )
keras.layers.GlobalAveragePooling3D(data_format = None )
keras.layers.LocallyConnected1D(filters ,
kernel_size ,
strides = 1 ,
padding = 'valid' ,
data_format = None ,
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 )
keras.layers.LocallyConnected2D(filters ,
kernel_size ,
strides = (1, 1) ,
padding = 'valid' ,
data_format = None ,
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 )
keras.layers.RNN(cell ,
return_sequences = False,
return_state = False,
go_backwards = False,
stateful = False,
unroll = False)
keras.layers.SimpleRNN(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.0 ,
recurrent_dropout = 0.0 ,
return_sequences = False ,
return_state = False ,
go_backwards = False ,
stateful = False ,
unroll = False )
keras.layers.GRU(units ,
activation = 'tanh' ,
recurrent_activation = 'hard_sigmoid' ,
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.0 ,
recurrent_dropout = 0.0 ,
implementation = 1 ,
return_sequences = False ,
return_state = False ,
go_backwards = False ,
stateful = False ,
unroll = False ,
reset_after = False )
keras.layers.LSTM(units ,
activation = 'tanh' ,
recurrent_activation = 'hard_sigmoid' ,
use_bias = True ,
kernel_initializer = 'glorot_uniform',
recurrent_initializer = 'orthogonal' ,
bias_initializer = 'zeros' ,
unit_forget_bias = True ,
kernel_regularizer = None ,
recurrent_regularizer = None ,
bias_regularizer = None ,
activity_regularizer = None ,
kernel_constraint = None ,
recurrent_constraint = None ,
bias_constraint = None ,
dropout = 0.0 ,
recurrent_dropout = 0.0 ,
implementation = 1 ,
return_sequences = False ,
return_state = False ,
go_backwards = False ,
stateful = False ,
unroll = False )
keras.layers.ConvLSTM2D(filters ,
kernel_size ,
strides = (1, 1) ,
padding = 'valid' ,
data_format = None ,
dilation_rate = (1, 1) ,
activation = 'tanh' ,
recurrent_activation = 'hard_sigmoid' ,
use_bias = True ,
kernel_initializer = 'glorot_uniform',
recurrent_initializer = 'orthogonal' ,
bias_initializer = 'zeros' ,
unit_forget_bias = True ,
kernel_regularizer = None ,
recurrent_regularizer = None ,
bias_regularizer = None ,
activity_regularizer = None ,
kernel_constraint = None ,
recurrent_constraint = None ,
bias_constraint = None ,
return_sequences = False ,
go_backwards = False ,
stateful = False ,
dropout = 0.0 ,
recurrent_dropout = 0.0 )
keras.layers.SimpleRNNCell(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 ,
kernel_constraint = None ,
recurrent_constraint = None ,
bias_constraint = None ,
dropout = 0.0 ,
recurrent_dropout = 0.0 )
keras.layers.GRUCell(units ,
activation = 'tanh' ,
recurrent_activation = 'hard_sigmoid' ,
use_bias = True ,
kernel_initializer = 'glorot_uniform',
recurrent_initializer = 'orthogonal' ,
bias_initializer = 'zeros' ,
kernel_regularizer = None ,
recurrent_regularizer = None ,
bias_regularizer = None ,
kernel_constraint = None ,
recurrent_constraint = None ,
bias_constraint = None ,
dropout = 0.0 ,
recurrent_dropout = 0.0 ,
implementation = 1 ,
reset_after = False )
keras.layers.LSTMCell(units ,
activation = 'tanh' ,
recurrent_activation = 'hard_sigmoid' ,
use_bias = True ,
kernel_initializer = 'glorot_uniform',
recurrent_initializer = 'orthogonal' ,
bias_initializer = 'zeros' ,
unit_forget_bias = True ,
kernel_regularizer = None ,
recurrent_regularizer = None ,
bias_regularizer = None ,
kernel_constraint = None ,
recurrent_constraint = None ,
bias_constraint = None ,
dropout = 0.0 ,
recurrent_dropout = 0.0 ,
implementation = 1 )
keras.layers.CuDNNGRU(units ,
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 ,
return_sequences = False ,
return_state = False ,
stateful = False )
keras.layers.CuDNNLSTM(units ,
kernel_initializer = 'glorot_uniform',
recurrent_initializer = 'orthogonal' ,
bias_initializer = 'zeros' ,
unit_forget_bias = True ,
kernel_regularizer = None ,
recurrent_regularizer = None ,
bias_regularizer = None ,
activity_regularizer = None ,
kernel_constraint = None ,
recurrent_constraint = None ,
bias_constraint = None ,
return_sequences = False ,
return_state = False ,
stateful = False )
keras.layers.Embedding(input_dim ,
output_dim ,
embeddings_initializer = 'uniform',
embeddings_regularizer = None ,
activity_regularizer = None ,
embeddings_constraint = None ,
mask_zero = False ,
input_length = None )
keras.layers.LeakyReLU(alpha=0.3)
keras.layers.PReLU(alpha_initializer = 'zeros',
alpha_regularizer = None ,
alpha_constraint = None ,
shared_axes = None )
keras.layers.ELU (alpha = 1.0 )
keras.layers.ThresholdedReLU(theta = 1.0 )
keras.layers.Softmax (axis = -1 )
keras.layers.ReLU (max_value = None,negative_slope=0.0,threshold=0.0)
keras.layers.BatchNormalization(axis = -1 ,
momentum = 0.99 ,
epsilon = 0.001 ,
center = True ,
scale = True ,
beta_initializer = 'zeros',
gamma_initializer = 'ones' ,
moving_mean_initializer = 'zeros',
moving_variance_initializer = 'ones' ,
beta_regularizer = None ,
gamma_regularizer = None ,
beta_constraint = None ,
gamma_constraint = None )
keras.layers.GaussianNoise (stddev)
keras.layers.GaussianDropout(rate )
keras.layers.AlphaDropout (rate , noise_shape=None, seed=None)
keras.layers.TimeDistributed(layer )
####
keras.layers.Add ()
keras.layers.Subtract()
keras.layers.Multiply()
keras.layers.Average ()
keras.layers.Maximum ()
keras.layers.Concatenate(axis = -1)
keras.layers.Dot (axes , normalize=False)
####
keras.layers.add (inputs)
keras.layers.subtract (inputs)
keras.layers.multiply (inputs)
keras.layers.average (inputs)
keras.layers.maximum (inputs)
keras.layers.concatenate(inputs, axis = -1)
keras.layers.dot (inputs, axes , normalize = False)
####
layer.get_weights()
layer.set_weights(weights)
layer.get_config()
layer.input
layer.output
layer.input_shape
layer.output_shape
layer.get_input_at (node_index)
layer.get_output_at (node_index)
layer.get_input_shape_at (node_index)
layer.get_output_shape_at(node_index)
Reference: keras.io
Wednesday, 16 January 2019
TensorFlow Keras Layers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment