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

ShareConvolution2D

class ShareConvolution2D[T] extends KerasLayer[Tensor[T], Tensor[T], T] with Net

Applies a 2D convolution over an input image composed of several input planes. You can also use ShareConv2D as an alias of this layer. Data format currently supported for this layer is DataFormat.NCHW (dimOrdering='th'). The input of this layer should be 4D.

When you use this layer as the first layer of a model, you need to provide the argument inputShape (a Single Shape, does not include the batch dimension), e.g. inputShape=Shape(3, 128, 128) for 128x128 RGB pictures.

Remark: This layer is from Torch and wrapped in Keras style.

T

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

Linear Supertypes
Net, 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. ShareConvolution2D
  2. Net
  3. KerasLayer
  4. Container
  5. AbstractModule
  6. InferShape
  7. Serializable
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ShareConvolution2D(nbFilter: Int, nbRow: Int, nbCol: Int, init: InitializationMethod = com.intel.analytics.bigdl.nn.Xavier, activation: KerasLayer[Tensor[T], Tensor[T], T] = null, subsample: Array[Int] = scala.Array.apply(1, 1), padH: Int = 0, padW: Int = 0, propagateBack: Boolean = true, dimOrdering: DataFormat = ..., wRegularizer: Regularizer[T] = null, bRegularizer: Regularizer[T] = null, bias: Boolean = true, inputShape: Shape = null)(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    nbFilter

    Number of convolution filters to use.

    nbRow

    Number of rows in the convolution kernel.

    nbCol

    Number of columns in the convolution kernel.

    init

    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.

    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.

    subsample

    Int array of length 2 corresponding to the step of the convolution in the height and width dimension. Also called strides elsewhere. Default is (1, 1).

    padH

    The additional zeros added to the height dimension. Default is 0.

    padW

    The additional zeros added to the width dimension. Default is 0.

    propagateBack

    Whether to propagate gradient back. Default is true.

    dimOrdering

    Format of input data. Please use DataFormat.NCHW (dimOrdering='th').

    wRegularizer

    An instance of Regularizer, (eg. L1 or L2 regularization), applied to the input weights matrices. Default is null.

    bRegularizer

    An instance of Regularizer, applied to the bias. Default is null.

    bias

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

    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.

  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]

    An instance of Regularizer, applied to the bias.

    An instance of Regularizer, applied to the bias. Default is null.

  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

    Whether to include a bias (i.

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

  14. def build(calcInputShape: Shape): Shape

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

    Definition Classes
    Container → AbstractModule
  16. final def checkEngineType(): ShareConvolution2D.this.type

    Definition Classes
    Container → AbstractModule
  17. def clearState(): ShareConvolution2D.this.type

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

    Definition Classes
    AbstractModule
  19. def clone(): AnyRef

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

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

    Definition Classes
    ShareConvolution2D → KerasLayer → InferShape
  22. val dimOrdering: DataFormat

    Format of input data.

    Format of input data. Please use DataFormat.NCHW (dimOrdering='th').

  23. def doBuild(inputShape: Shape): AbstractModule[Tensor[T], Tensor[T], T]

    Definition Classes
    ShareConvolution2D → KerasLayer
  24. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Definition Classes
    AbstractModule
  30. def finalize(): Unit

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

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

    Definition Classes
    AbstractModule
  33. var forwardTime: Long

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

    Definition Classes
    Container → AbstractModule
  35. 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
  36. final def getClass(): Class[_]

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

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

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

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

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

    Definition Classes
    InferShape
  42. def getParametersTable(): Table

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

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

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

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

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

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

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

    Definition Classes
    AbstractModule
  50. final def hasName: Boolean

    Definition Classes
    AbstractModule
  51. def hashCode(): Int

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

    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.

  53. val inputShape: Shape

    A Single Shape, does not include the batch dimension.

  54. def inputs(first: (ModuleNode[T], Int), nodesWithIndex: (ModuleNode[T], Int)*): ModuleNode[T]

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

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

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

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

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

    Definition Classes
    Any
  60. def isKerasStyle(): Boolean

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

    Definition Classes
    AbstractModule
  62. def labor: AbstractModule[Tensor[T], Tensor[T], T]

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

    Definition Classes
    KerasLayer
  64. var line: String

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

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

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

    Definition Classes
    Container
  68. val nbCol: Int

    Number of columns in the convolution kernel.

  69. val nbFilter: Int

    Number of convolution filters to use.

  70. val nbRow: Int

    Number of rows in the convolution kernel.

  71. final def ne(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AbstractModule
  75. val padH: Int

    The additional zeros added to the height dimension.

    The additional zeros added to the height dimension. Default is 0.

  76. val padW: Int

    The additional zeros added to the width dimension.

    The additional zeros added to the width dimension. Default is 0.

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

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

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

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

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

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

    Attributes
    protected
    Definition Classes
    AbstractModule
  83. val propagateBack: Boolean

    Whether to propagate gradient back.

    Whether to propagate gradient back. Default is true.

  84. final def quantize(): Module[T]

    Definition Classes
    AbstractModule
  85. def release(): Unit

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

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

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

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

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

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

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

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

    Definition Classes
    AbstractModule
  94. var scaleB: Double

    Attributes
    protected
    Definition Classes
    AbstractModule
  95. var scaleW: Double

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

    Definition Classes
    AbstractModule
  97. final def setLine(line: String): ShareConvolution2D.this.type

    Definition Classes
    AbstractModule
  98. final def setName(name: String): ShareConvolution2D.this.type

    Definition Classes
    AbstractModule
  99. def setScaleB(b: Double): ShareConvolution2D.this.type

    Definition Classes
    Container → AbstractModule
  100. def setScaleW(w: Double): ShareConvolution2D.this.type

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

    Definition Classes
    AbstractModule
  102. val subsample: Array[Int]

    Int array of length 2 corresponding to the step of the convolution in the height and width dimension.

    Int array of length 2 corresponding to the step of the convolution in the height and width dimension. Also called strides elsewhere. Default is (1, 1).

  103. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Definition Classes
    AbstractModule
  105. def toString(): String

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

    Attributes
    protected
    Definition Classes
    AbstractModule
  107. final def training(): ShareConvolution2D.this.type

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

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

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

    Definition Classes
    KerasLayer → AbstractModule
  111. var wRegularizer: Regularizer[T]

    An instance of Regularizer, (eg.

    An instance of Regularizer, (eg. L1 or L2 regularization), applied to the input weights matrices. Default is null.

  112. final def wait(): Unit

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

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

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

    Definition Classes
    AbstractModule

Deprecated Value Members

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

    Definition Classes
    AbstractModule
    Annotations
    @deprecated
    Deprecated

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

Inherited from Net

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