tf.layers.Conv1D,1维卷积层

@tf_export(v1=['layers.Conv1D'])
class Conv1D(keras_layers.Conv1D, base.Layer):
  """1D convolution layer (e.g. temporal convolution).

  This layer creates a convolution kernel that is convolved
  (actually cross-correlated) with the layer input to produce a tensor of
  outputs. If `use_bias` is True (and a `bias_initializer` is provided),
  a bias vector is created and added to the outputs. Finally, if
  `activation` is not `None`, it is applied to the outputs as well.
这个Layer创建一个卷积核对input进行卷积并产生一个outputs tensor。如果use_bias is True并且提供了bias_initializer,一个bias向量会被添加到outputs。如果activation不是None,那也会被应用到outputs。

  Arguments:
    filters: Integer, the dimensionality of the output space (i.e. the number
      of filters in the convolution).
filters:int型,filters的个数,对应output的维度;

    kernel_size: An integer or tuple/list of a single integer, specifying the
      length of the 1D convolution window.
kernel_size:int, 指定1D卷积窗口的大小。

    strides: An integer or tuple/list of a single integer,
      specifying the stride length of the convolution.
      Specifying any stride value != 1 is incompatible with specifying
      any `dilation_rate` value != 1.
strides:int, 指定卷积的步长。stride!=1与dilation_rate!=1不兼容。

    padding: One of `"valid"` or `"same"` (case-insensitive).
padding:valid或same(stride>1时,边界会补0)。

    data_format: A string, one of `channels_last` (default) or `channels_first`.
      The ordering of the dimensions in the inputs.
      `channels_last` corresponds to inputs with shape
      `(batch, length, channels)` while `channels_first` corresponds to
      inputs with shape `(batch, channels, length)`.
data_format:string, channels_last(默认)或channels_first。inputs的维度顺序。
channels_last表示输入的shape=(batch, length, channels);
channels_first表示输入的shape=(batch, channels, length);

    dilation_rate: An integer or tuple/list of a single integer, specifying
      the dilation rate to use for dilated convolution.
      Currently, specifying any `dilation_rate` value != 1 is
      incompatible with specifying any `strides` value != 1.
dilation_rate:int,用于dilated卷积的dilation rate,dilation_rate!=1与strides!=1不兼容。也就是说,如果要让dilation_rate!=1,那么strides必须为1。

    activation: Activation function. Set it to None to maintain a
      linear activation.
activation:激活函数。

    use_bias: Boolean, whether the layer uses a bias.
use_bias:bool,是否使用bias。

    kernel_initializer: An initializer for the convolution kernel.
kernel_initializer:卷积核的初始化方法。

    bias_initializer: An initializer for the bias vector. If None, the default
      initializer will be used.
bias_initializer:bias向量的初始化方法。

    kernel_regularizer: Optional regularizer for the convolution kernel.
kernel_regularizer:可选,用于卷积核的regularizer。

    bias_regularizer: Optional regularizer for the bias vector.
bias_regularizer:可选,用于bias向量的regularizer。

    activity_regularizer: Optional regularizer function for the output.
activity_regularizer:可选,用于output的regularizer。

    kernel_constraint: Optional projection function to be applied to the
        kernel after being updated by an `Optimizer` (e.g. used to implement
        norm constraints or value constraints for layer weights). The function
        must take as input the unprojected variable and must return the
        projected variable (which must have the same shape). Constraints are
        not safe to use when doing asynchronous distributed training.
kernel_constraint:可选,将一个映射函数应用到被Optimizer更新后的kernel(比如用于对layer weights实现norm约束或value约束)。这个函数必须能够接受input作为未映射变量并返回一个相同形状的映射变量。进行异步分布式训练的时候,约束是不安全的。

    bias_constraint: Optional projection function to be applied to the
        bias after being updated by an `Optimizer`.
bias_constraint:可选,讲一个映射函数应用到被Optimizer更新后的bias。

    trainable: Boolean, if `True` also add variables to the graph collection
      `GraphKeys.TRAINABLE_VARIABLES` (see `tf.Variable`).
trainable:布尔,如果是True,那么也会将variables添加到图集合中。 `GraphKeys.TRAINABLE_VARIABLES` (参考`tf.Variable`)

    name: A string, the name of the layer.
name:string,名字。
  """
posted @ 2020-07-31 11:56  ZH奶酪  阅读(1125)  评论(0编辑  收藏  举报