Class/Object

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

Conv1D

Related Docs: object Conv1D | package layers

Permalink

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
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 = Xavier, biasInitializer: InitializationMethod = Zeros, kernelRegularizer: Regularizer[T] = null, biasRegularizer: Regularizer[T] = null, inputShape: Shape = null)(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    Permalink

    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: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def accGradParameters(input: Tensor[T], gradOutput: Tensor[T]): Unit

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

    Permalink

    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
  6. def apply(name: String): Option[AbstractModule[Activity, Activity, T]]

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

    Permalink
    Definition Classes
    Any
  8. var bRegularizer: Regularizer[T]

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

    Permalink
    Definition Classes
    AbstractModule
  10. var backwardTime: Long

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractModule
  11. val bias: Boolean

    Permalink

    Whether to include a bias (i.e.

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

    Definition Classes
    Convolution1D → Convolution1D
  12. val biasInitializer: InitializationMethod

    Permalink

    Initializer for the bias vector.

  13. val biasRegularizer: Regularizer[T]

    Permalink

    Regularizer function applied to the bias vector.

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

  14. val borderMode: String

    Permalink

    Either 'valid' or 'same'.

    Either 'valid' or 'same'. Default is 'valid'.

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  20. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def cloneModule(): Conv1D.this.type

    Permalink
    Definition Classes
    AbstractModule
  22. def computeOutputShape(inputShape: Shape): Shape

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  28. final def evaluate(dataset: RDD[MiniBatch[T]], vMethods: Array[_ <: ValidationMethod[T]]): Array[(ValidationResult, ValidationMethod[T])]

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

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

    Permalink
    Definition Classes
    AbstractModule
  31. val filterLength: Int

    Permalink

    The extension (spatial or temporal) of each filter.

    The extension (spatial or temporal) of each filter.

    Definition Classes
    Convolution1D → Convolution1D
  32. val filters: Int

    Permalink

    Integer, the dimensionality of the output space (i.e.

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

  33. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AbstractModule
  36. var forwardTime: Long

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

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

    Permalink

    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
  39. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    InferShape
  42. final def getName(): String

    Permalink
    Definition Classes
    AbstractModule
  43. final def getNumericType(): TensorDataType

    Permalink
    Definition Classes
    AbstractModule
  44. final def getOutputShape(): Shape

    Permalink
    Definition Classes
    InferShape
  45. def getParametersTable(): Table

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

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

    Permalink
    Definition Classes
    AbstractModule
  48. final def getScaleW(): Double

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  52. var gradInput: Tensor[T]

    Permalink
    Definition Classes
    AbstractModule
  53. final def hasName: Boolean

    Permalink
    Definition Classes
    AbstractModule
  54. def hashCode(): Int

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

    Permalink

    Initialization method for the weights of the layer.

    Initialization method for the weights of the layer. Default is Xavier. You can also pass in corresponding string representations such as 'glorot_uniform' or 'normal', etc. for simple init methods in the factory method.

    Definition Classes
    Convolution1D → Convolution1D
  56. val inputShape: Shape

    Permalink

    A Single Shape, does not include the batch dimension.

    A Single Shape, does not include the batch dimension.

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  63. def isKerasStyle(): Boolean

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

    Permalink
    Definition Classes
    AbstractModule
  65. val kernelInitializer: InitializationMethod

    Permalink

    Initializer for the kernel weights matrix.

  66. val kernelRegularizer: Regularizer[T]

    Permalink

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

  67. val kernelSize: Int

    Permalink
  68. def labor: AbstractModule[Tensor[T], Tensor[T], T]

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

    Permalink
    Definition Classes
    KerasLayer
  70. var line: String

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

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

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

    Permalink
    Definition Classes
    Container
  74. val nbFilter: Int

    Permalink

    Number of convolution filters to use.

    Number of convolution filters to use.

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

    Permalink
    Definition Classes
    AnyRef
  76. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  77. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  78. var output: Tensor[T]

    Permalink
    Definition Classes
    AbstractModule
  79. val padding: String

    Permalink

    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.

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  87. def release(): Unit

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  96. var scaleB: Double

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractModule
  97. var scaleW: Double

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  104. val strides: Int

    Permalink
  105. val subsampleLength: Int

    Permalink

    Factor by which to subsample output.

    Factor by which to subsample output. Integer. Default is 1.

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

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

    Permalink
    Definition Classes
    AbstractModule
  108. def toString(): String

    Permalink
    Definition Classes
    AbstractModule → AnyRef → Any
  109. var train: Boolean

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

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

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

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

    Permalink
    Definition Classes
    KerasLayer → AbstractModule
  114. val useBias: Boolean

    Permalink

    Whether to include a bias (i.e.

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

  115. var wRegularizer: Regularizer[T]

    Permalink
    Definition Classes
    Convolution1D
  116. final def wait(): Unit

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

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

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

    Permalink
    Definition Classes
    AbstractModule

Deprecated Value Members

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

    Permalink
    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