Class/Object

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

ShareConvolution2D

Related Docs: object ShareConvolution2D | package layers

Permalink

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
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

    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: 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.

  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

    An instance of Regularizer, applied to the bias.

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

  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.

  12. def build(calcInputShape: Shape): Shape

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    ShareConvolution2D → KerasLayer → InferShape
  20. val dimOrdering: DataFormat

    Permalink

    Format of input data.

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  29. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AbstractModule
  32. var forwardTime: Long

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  49. final def hasName: Boolean

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

    Permalink
    Definition Classes
    Container → AbstractModule → AnyRef → Any
  51. 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.

  52. val inputShape: Shape

    Permalink

    A Single Shape, does not include the batch dimension.

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    KerasLayer
  63. var line: String

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

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

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

    Permalink
    Definition Classes
    Container
  67. val nbCol: Int

    Permalink

    Number of columns in the convolution kernel.

  68. val nbFilter: Int

    Permalink

    Number of convolution filters to use.

  69. val nbRow: Int

    Permalink

    Number of rows in the convolution kernel.

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  74. val padH: Int

    Permalink

    The additional zeros added to the height dimension.

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

  75. val padW: Int

    Permalink

    The additional zeros added to the width dimension.

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractModule
  82. val propagateBack: Boolean

    Permalink

    Whether to propagate gradient back.

    Whether to propagate gradient back. Default is true.

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  93. var scaleB: Double

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  101. val subsample: Array[Int]

    Permalink

    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).

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

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

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

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

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

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

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

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

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

    Permalink

    An instance of Regularizer, (eg.

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

  111. final def wait(): Unit

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

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

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

    Permalink
    Definition Classes
    AbstractModule

Deprecated Value Members

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

    Permalink
    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