com.intel.analytics.zoo.pipeline.api.keras2.layers

Conv1D

class Conv1D[T] extends Convolution1D[T] with Net

1D convolution layer (e.g. temporal convolution). This layer creates a convolution kernel that is convolved with the layer input over a single spatial (or temporal) dimension to produce a tensor of outputs. If use_bias is True, a bias vector is created and added to the outputs. Finally, if activation is not None, it is applied to the outputs as well.

When using this layer as the first layer in a model, provide an input_shape argument (tuple of integers or None, e.g. (10, 128) for sequences of 10 vectors of 128-dimensional vectors, or (None, 128) for variable-length sequences of 128-dimensional vectors.

Input shape 3D tensor with shape: (batch_size, steps, input_dim)

Output shape 3D tensor with shape: (batch_size, new_steps, filters) steps value might have changed due to padding or strides.

T

Numeric type of parameter(e.g. weight, bias). Only support float/double now.

Linear Supertypes
Convolution1D[T], Net, Convolution1D[T], KerasLayer[Tensor[T], Tensor[T], T], Container[Tensor[T], Tensor[T], T], AbstractModule[Tensor[T], Tensor[T], T], InferShape, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Conv1D
  2. Convolution1D
  3. Net
  4. Convolution1D
  5. KerasLayer
  6. Container
  7. AbstractModule
  8. InferShape
  9. Serializable
  10. Serializable
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Conv1D(filters: Int, kernelSize: Int, strides: Int = 1, padding: String = "valid", activation: KerasLayer[Tensor[T], Tensor[T], T] = null, useBias: Boolean = true, kernelInitializer: InitializationMethod = com.intel.analytics.bigdl.nn.Xavier, biasInitializer: InitializationMethod = com.intel.analytics.bigdl.nn.Zeros, kernelRegularizer: Regularizer[T] = null, biasRegularizer: Regularizer[T] = null, inputShape: Shape = null)(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    filters

    Integer, the dimensionality of the output space (i.e. the number of output filters in the convolution).

    padding

    One of "valid", "causal" or "same" (case-insensitive). "valid" means "no padding". "same" results in padding the input such that the output has the same length as the original input. "causal" results in causal (dilated) convolutions, e.g. output[t] does not depend on input[t+1:]. Useful when modeling temporal data where the model should not violate the temporal order.

    activation

    Activation function to use. Default is null. You can also pass in corresponding string representations such as 'relu' or 'sigmoid', etc. for simple activations in the factory method.

    useBias

    Whether to include a bias (i.e. make the layer affine rather than linear). Default is true.

    kernelInitializer

    Initializer for the kernel weights matrix.

    biasInitializer

    Initializer for the bias vector.

    kernelRegularizer

    Regularizer function applied to the kernel weights matrix Default is null.

    biasRegularizer

    Regularizer function applied to the bias vector. Default is null.

    inputShape

    A Single Shape, does not include the batch dimension.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def accGradParameters(input: Tensor[T], gradOutput: Tensor[T]): Unit

    Definition Classes
    KerasLayer → AbstractModule
  7. val activation: KerasLayer[Tensor[T], Tensor[T], T]

    Activation function to use.

    Activation function to use. Default is null. You can also pass in corresponding string representations such as 'relu' or 'sigmoid', etc. for simple activations in the factory method.

    Definition Classes
    Conv1DConvolution1D → Convolution1D
  8. def apply(name: String): Option[AbstractModule[Activity, Activity, T]]

    Definition Classes
    Container → AbstractModule
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. var bRegularizer: Regularizer[T]

    Definition Classes
    Convolution1D
  11. def backward(input: Tensor[T], gradOutput: Tensor[T]): Tensor[T]

    Definition Classes
    AbstractModule
  12. var backwardTime: Long

    Attributes
    protected
    Definition Classes
    AbstractModule
  13. val bias: Boolean

    Definition Classes
    Convolution1D → Convolution1D
  14. val biasInitializer: InitializationMethod

    Initializer for the bias vector.

  15. val biasRegularizer: Regularizer[T]

    Regularizer function applied to the bias vector.

    Regularizer function applied to the bias vector. Default is null.

  16. val borderMode: String

    Definition Classes
    Convolution1D → Convolution1D
  17. def build(calcInputShape: Shape): Shape

    Definition Classes
    KerasLayer → InferShape
  18. def canEqual(other: Any): Boolean

    Definition Classes
    Container → AbstractModule
  19. final def checkEngineType(): Conv1D.this.type

    Definition Classes
    Container → AbstractModule
  20. def clearState(): Conv1D.this.type

    Definition Classes
    Container → AbstractModule
  21. final def clone(deepCopy: Boolean): AbstractModule[Tensor[T], Tensor[T], T]

    Definition Classes
    AbstractModule
  22. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def cloneModule(): AbstractModule[Tensor[T], Tensor[T], T]

    Definition Classes
    AbstractModule
  24. def computeOutputShape(inputShape: Shape): Shape

    Definition Classes
    Convolution1D → KerasLayer → InferShape
  25. def doBuild(inputShape: Shape): AbstractModule[Tensor[T], Tensor[T], T]

    Definition Classes
    Conv1D → Convolution1D → KerasLayer
  26. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. def equals(other: Any): Boolean

    Definition Classes
    Container → AbstractModule → AnyRef → Any
  28. final def evaluate(): Conv1D.this.type

    Definition Classes
    Container → AbstractModule
  29. final def evaluate(dataSet: LocalDataSet[MiniBatch[T]], vMethods: Array[_ <: ValidationMethod[T]]): Array[(ValidationResult, ValidationMethod[T])]

    Definition Classes
    AbstractModule
  30. final def evaluate(dataset: RDD[Sample[T]], vMethods: Array[_ <: ValidationMethod[T]], batchSize: Option[Int]): Array[(ValidationResult, ValidationMethod[T])]

    Definition Classes
    AbstractModule
  31. final def evaluateImage(imageFrame: ImageFrame, vMethods: Array[_ <: ValidationMethod[T]], batchSize: Option[Int]): Array[(ValidationResult, ValidationMethod[T])]

    Definition Classes
    AbstractModule
  32. val filterLength: Int

    Definition Classes
    Convolution1D → Convolution1D
  33. val filters: Int

    Integer, the dimensionality of the output space (i.

    Integer, the dimensionality of the output space (i.e. the number of output filters in the convolution).

  34. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  35. def findModules(moduleType: String): ArrayBuffer[AbstractModule[_, _, T]]

    Definition Classes
    Container
  36. final def forward(input: Tensor[T]): Tensor[T]

    Definition Classes
    AbstractModule
  37. var forwardTime: Long

    Attributes
    protected
    Definition Classes
    AbstractModule
  38. def freeze(names: String*): Conv1D.this.type

    Definition Classes
    Container → AbstractModule
  39. def from[T](vars: Variable[T]*)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Variable[T]

    Build graph: some other modules point to current module

    Build graph: some other modules point to current module

    vars

    upstream variables

    returns

    Variable containing current module

    Definition Classes
    Net
  40. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  41. def getExtraParameter(): Array[Tensor[T]]

    Definition Classes
    Container → AbstractModule
  42. final def getInputShape(): Shape

    Definition Classes
    InferShape
  43. final def getName(): String

    Definition Classes
    AbstractModule
  44. final def getNumericType(): TensorDataType

    Definition Classes
    AbstractModule
  45. final def getOutputShape(): Shape

    Definition Classes
    InferShape
  46. def getParametersTable(): Table

    Definition Classes
    Container → AbstractModule
  47. final def getPrintName(): String

    Attributes
    protected
    Definition Classes
    AbstractModule
  48. final def getScaleB(): Double

    Definition Classes
    AbstractModule
  49. final def getScaleW(): Double

    Definition Classes
    AbstractModule
  50. def getTimes(): Array[(AbstractModule[_ <: Activity, _ <: Activity, T], Long, Long)]

    Definition Classes
    Container → AbstractModule
  51. final def getTimesGroupByModuleType(): Array[(String, Long, Long)]

    Definition Classes
    AbstractModule
  52. final def getWeightsBias(): Array[Tensor[T]]

    Definition Classes
    AbstractModule
  53. var gradInput: Tensor[T]

    Definition Classes
    AbstractModule
  54. final def hasName: Boolean

    Definition Classes
    AbstractModule
  55. def hashCode(): Int

    Definition Classes
    Container → AbstractModule → AnyRef → Any
  56. val init: InitializationMethod

    Definition Classes
    Convolution1D → Convolution1D
  57. val inputShape: Shape

    A Single Shape, does not include the batch dimension.

    A Single Shape, does not include the batch dimension.

    Definition Classes
    Conv1DConvolution1D → Convolution1D
  58. def inputs(first: (ModuleNode[T], Int), nodesWithIndex: (ModuleNode[T], Int)*): ModuleNode[T]

    Definition Classes
    KerasLayer → AbstractModule
  59. def inputs(nodes: Array[ModuleNode[T]]): ModuleNode[T]

    Definition Classes
    KerasLayer → AbstractModule
  60. def inputs(nodes: ModuleNode[T]*): ModuleNode[T]

    Definition Classes
    KerasLayer → AbstractModule
  61. def isBuilt(): Boolean

    Definition Classes
    KerasLayer → InferShape
  62. def isFrozen[T]()(implicit arg0: ClassTag[T]): Boolean

    Definition Classes
    Net
  63. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  64. def isKerasStyle(): Boolean

    Definition Classes
    KerasLayer → InferShape
  65. final def isTraining(): Boolean

    Definition Classes
    AbstractModule
  66. val kernelInitializer: InitializationMethod

    Initializer for the kernel weights matrix.

  67. val kernelRegularizer: Regularizer[T]

    Regularizer function applied to the kernel weights matrix Default is null.

  68. val kernelSize: Int

  69. def labor: AbstractModule[Tensor[T], Tensor[T], T]

    Definition Classes
    KerasLayer
  70. def labor_=(value: AbstractModule[Tensor[T], Tensor[T], T]): Unit

    Definition Classes
    KerasLayer
  71. var line: String

    Attributes
    protected
    Definition Classes
    AbstractModule
  72. final def loadModelWeights(srcModel: Module[Float], matchAll: Boolean): Conv1D.this.type

    Definition Classes
    AbstractModule
  73. final def loadWeights(weightPath: String, matchAll: Boolean): Conv1D.this.type

    Definition Classes
    AbstractModule
  74. val modules: ArrayBuffer[AbstractModule[Activity, Activity, T]]

    Definition Classes
    Container
  75. val nbFilter: Int

    Definition Classes
    Convolution1D → Convolution1D
  76. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  77. final def notify(): Unit

    Definition Classes
    AnyRef
  78. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  79. var output: Tensor[T]

    Definition Classes
    AbstractModule
  80. val padding: String

    One of "valid", "causal" or "same" (case-insensitive).

    One of "valid", "causal" or "same" (case-insensitive). "valid" means "no padding". "same" results in padding the input such that the output has the same length as the original input. "causal" results in causal (dilated) convolutions, e.g. output[t] does not depend on input[t+1:]. Useful when modeling temporal data where the model should not violate the temporal order.

  81. def parameters(): (Array[Tensor[T]], Array[Tensor[T]])

    Definition Classes
    Container → AbstractModule
  82. final def predict(dataset: RDD[Sample[T]], batchSize: Int, shareBuffer: Boolean): RDD[Activity]

    Definition Classes
    AbstractModule
  83. final def predictClass(dataset: RDD[Sample[T]], batchSize: Int): RDD[Int]

    Definition Classes
    AbstractModule
  84. final def predictImage(imageFrame: ImageFrame, outputLayer: String, shareBuffer: Boolean, batchPerPartition: Int, predictKey: String, featurePaddingParam: Option[PaddingParam[T]]): ImageFrame

    Definition Classes
    AbstractModule
  85. def processInputs(first: (ModuleNode[T], Int), nodesWithIndex: (ModuleNode[T], Int)*): ModuleNode[T]

    Attributes
    protected
    Definition Classes
    AbstractModule
  86. def processInputs(nodes: Seq[ModuleNode[T]]): ModuleNode[T]

    Attributes
    protected
    Definition Classes
    AbstractModule
  87. final def quantize(): Module[T]

    Definition Classes
    AbstractModule
  88. def release(): Unit

    Definition Classes
    Container → AbstractModule
  89. def reset(): Unit

    Definition Classes
    Container → AbstractModule
  90. def resetTimes(): Unit

    Definition Classes
    Container → AbstractModule
  91. final def saveCaffe(prototxtPath: String, modelPath: String, useV2: Boolean, overwrite: Boolean): Conv1D.this.type

    Definition Classes
    AbstractModule
  92. final def saveDefinition(path: String, overWrite: Boolean): Conv1D.this.type

    Definition Classes
    AbstractModule
  93. final def saveModule(path: String, weightPath: String, overWrite: Boolean): Conv1D.this.type

    Definition Classes
    AbstractModule
  94. final def saveTF(inputs: Seq[(String, Seq[Int])], path: String, byteOrder: ByteOrder, dataFormat: TensorflowDataFormat): Conv1D.this.type

    Definition Classes
    AbstractModule
  95. final def saveTorch(path: String, overWrite: Boolean): Conv1D.this.type

    Definition Classes
    AbstractModule
  96. final def saveWeights(path: String, overWrite: Boolean): Unit

    Definition Classes
    AbstractModule
  97. var scaleB: Double

    Attributes
    protected
    Definition Classes
    AbstractModule
  98. var scaleW: Double

    Attributes
    protected
    Definition Classes
    AbstractModule
  99. final def setExtraParameter(extraParam: Array[Tensor[T]]): Conv1D.this.type

    Definition Classes
    AbstractModule
  100. final def setLine(line: String): Conv1D.this.type

    Definition Classes
    AbstractModule
  101. final def setName(name: String): Conv1D.this.type

    Definition Classes
    AbstractModule
  102. def setScaleB(b: Double): Conv1D.this.type

    Definition Classes
    Container → AbstractModule
  103. def setScaleW(w: Double): Conv1D.this.type

    Definition Classes
    Container → AbstractModule
  104. final def setWeightsBias(newWeights: Array[Tensor[T]]): Conv1D.this.type

    Definition Classes
    AbstractModule
  105. val strides: Int

  106. val subsampleLength: Int

    Definition Classes
    Convolution1D → Convolution1D
  107. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  108. def toGraph(startNodes: ModuleNode[T]*): Graph[T]

    Definition Classes
    AbstractModule
  109. def toString(): String

    Definition Classes
    AbstractModule → AnyRef → Any
  110. var train: Boolean

    Attributes
    protected
    Definition Classes
    AbstractModule
  111. final def training(): Conv1D.this.type

    Definition Classes
    Container → AbstractModule
  112. def unFreeze(names: String*): Conv1D.this.type

    Definition Classes
    Container → AbstractModule
  113. def updateGradInput(input: Tensor[T], gradOutput: Tensor[T]): Tensor[T]

    Definition Classes
    KerasLayer → AbstractModule
  114. def updateOutput(input: Tensor[T]): Tensor[T]

    Definition Classes
    KerasLayer → AbstractModule
  115. val useBias: Boolean

    Whether to include a bias (i.

    Whether to include a bias (i.e. make the layer affine rather than linear). Default is true.

  116. var wRegularizer: Regularizer[T]

    Definition Classes
    Convolution1D
  117. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  118. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  119. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  120. def zeroGradParameters(): Unit

    Definition Classes
    AbstractModule

Deprecated Value Members

  1. final def save(path: String, overWrite: Boolean): Conv1D.this.type

    Definition Classes
    AbstractModule
    Annotations
    @deprecated
    Deprecated

    (Since version 0.3.0) please use recommended saveModule(path, overWrite)

Inherited from Convolution1D[T]

Inherited from Net

Inherited from Convolution1D[T]

Inherited from KerasLayer[Tensor[T], Tensor[T], T]

Inherited from Container[Tensor[T], Tensor[T], T]

Inherited from AbstractModule[Tensor[T], Tensor[T], T]

Inherited from InferShape

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped