简体   繁体   English

Keras Conv1D 或 Convolution1D

[英]Keras Conv1D or Convolution1D

I came across multiple implementations of a CNN in Keras and noticed that some people use Conv1D from from keras.layers.convolutional import Conv1D and others use Convolution1D from from keras.layers import Convolution1D.我在 Keras 中遇到了 CNN 的多种实现,并注意到有些人使用来自 keras.layers.convolutional import Conv1D 的 Conv1D,而其他人使用来自 keras.layers import Convolution1D 的 Convolution1D。 Is there a difference or an advantage to either one or are they possibly simply just different versions of Keras.两者是否有区别或优势,或者它们可能只是 Keras 的不同版本。

它们仅适用于不同的 keras 版本,在 Keras 2.0 之前,N = 1、2、3 的层被称为 ConvolutionalND,而在 Keras 2.0 之后,它们仅被称为 ConvND。

It's not about the versions.这不是关于版本。 The n stands for the dimension of data, for eg if you are using a text data you use n=1 ie convolution1d. n 代表数据的维度,例如,如果您使用的是文本数据,则使用 n=1,即卷积 1d。 The value of n=2 is used for images. n=2 的值用于图像。 The value for n=3 goes for mri or ct scan. n=3 的值用于 mri 或 ct 扫描。 So, depending on the dimensions we use the value.因此,根据维度,我们使用该值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM