[Keras]Dense()

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定义网络层的基本方法。
  • 示例:
# as first layer in a sequential model:
model = Sequential()
model.add(Dense(32, input_shape=(16,)))
# now the model will take as input arrays of shape (*, 16)
# and output arrays of shape (*, 32)

# after the first layer, you don't need to specify
# the size of the input anymore:
model.add(Dense(32))

你可能感兴趣的:(Keras)