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,名字。
  """


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM