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

SReLU

class SReLU[T] extends bigdl.nn.keras.SReLU[T] with Net

S-shaped Rectified Linear Unit. It follows: f(x) = tr + ar(x - tr) for x >= tr, f(x) = x for tr > x > tl, f(x) = tl + al(x - tl) for x <= tl.

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

T

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

Linear Supertypes
Net, bigdl.nn.keras.SReLU[T], IdentityOutputShape, 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. SReLU
  2. Net
  3. SReLU
  4. IdentityOutputShape
  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 SReLU(tLeftInit: InitializationMethod = com.intel.analytics.bigdl.nn.Zeros, aLeftInit: InitializationMethod = com.intel.analytics.bigdl.nn.Xavier, tRightInit: InitializationMethod = com.intel.analytics.bigdl.nn.Xavier, aRightInit: InitializationMethod = com.intel.analytics.bigdl.nn.Ones, sharedAxes: Array[Int] = null, inputShape: Shape = null)(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    tLeftInit

    Initialization function for the left part intercept. Default is Zeros. You can also pass in corresponding string representations such as 'zero' or 'normal', etc. for simple init methods in the factory method.

    aLeftInit

    Initialization function for the left part slope. Default is Xavier. You can also pass in corresponding string representations such as 'glorot_uniform', etc. for simple init methods in the factory method.

    tRightInit

    Initialization function for the right part intercept. Default is Xavier. You can also pass in corresponding string representations such as 'glorot_uniform', etc. for simple init methods in the factory method.

    aRightInit

    Initialization function for the right part slope. Default is Ones. You can also pass in corresponding string representations such as 'one' or 'normal', etc. for simple init methods in the factory method.

    sharedAxes

    Array of Int. The axes along which to share learnable parameters for the activation function. Default is null. For example, if the incoming feature maps are from a 2D convolution with output shape (batch, height, width, channels), and you wish to share parameters across space so that each filter only has one set of parameters, set 'sharedAxes = Array(1,2)'.

    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. val aLeftInit: InitializationMethod

    Initialization function for the left part slope.

    Initialization function for the left part slope. Default is Xavier. You can also pass in corresponding string representations such as 'glorot_uniform', etc. for simple init methods in the factory method.

    Definition Classes
    SReLU → SReLU
  7. val aRightInit: InitializationMethod

    Initialization function for the right part slope.

    Initialization function for the right part slope. Default is Ones. You can also pass in corresponding string representations such as 'one' or 'normal', etc. for simple init methods in the factory method.

    Definition Classes
    SReLU → SReLU
  8. def accGradParameters(input: Tensor[T], gradOutput: Tensor[T]): Unit

    Definition Classes
    KerasLayer → AbstractModule
  9. def apply(name: String): Option[AbstractModule[Activity, Activity, T]]

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

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

    Definition Classes
    AbstractModule
  12. var backwardTime: Long

    Attributes
    protected
    Definition Classes
    AbstractModule
  13. def build(calcInputShape: Shape): Shape

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

    Definition Classes
    Container → AbstractModule
  15. final def checkEngineType(): SReLU.this.type

    Definition Classes
    Container → AbstractModule
  16. def clearState(): SReLU.this.type

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

    Definition Classes
    AbstractModule
  18. def clone(): AnyRef

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

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

    Definition Classes
    IdentityOutputShape → InferShape
  21. def doBuild(inputShape: Shape): AbstractModule[Tensor[T], Tensor[T], T]

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

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

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

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

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

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

    Definition Classes
    AbstractModule
  28. def finalize(): Unit

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

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

    Definition Classes
    AbstractModule
  31. var forwardTime: Long

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

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

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

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

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

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

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

    Definition Classes
    InferShape
  40. def getParametersTable(): Table

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

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

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

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

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

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

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

    Definition Classes
    AbstractModule
  48. final def hasName: Boolean

    Definition Classes
    AbstractModule
  49. def hashCode(): Int

    Definition Classes
    Container → AbstractModule → AnyRef → Any
  50. val inputShape: Shape

    A Single Shape, does not include the batch dimension.

    A Single Shape, does not include the batch dimension.

    Definition Classes
    SReLU → SReLU
  51. def inputs(first: (ModuleNode[T], Int), nodesWithIndex: (ModuleNode[T], Int)*): ModuleNode[T]

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

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

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

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

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

    Definition Classes
    Any
  57. def isKerasStyle(): Boolean

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

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

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

    Definition Classes
    KerasLayer
  61. var line: String

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

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

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

    Definition Classes
    Container
  65. final def ne(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AbstractModule
  69. def parameters(): (Array[Tensor[T]], Array[Tensor[T]])

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

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

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

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

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

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

    Definition Classes
    AbstractModule
  76. def release(): Unit

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

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

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

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

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

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

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

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

    Definition Classes
    AbstractModule
  85. var scaleB: Double

    Attributes
    protected
    Definition Classes
    AbstractModule
  86. var scaleW: Double

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

    Definition Classes
    AbstractModule
  88. final def setLine(line: String): SReLU.this.type

    Definition Classes
    AbstractModule
  89. final def setName(name: String): SReLU.this.type

    Definition Classes
    AbstractModule
  90. def setScaleB(b: Double): SReLU.this.type

    Definition Classes
    Container → AbstractModule
  91. def setScaleW(w: Double): SReLU.this.type

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

    Definition Classes
    AbstractModule
  93. val sharedAxes: Array[Int]

    Array of Int.

    Array of Int. The axes along which to share learnable parameters for the activation function. Default is null. For example, if the incoming feature maps are from a 2D convolution with output shape (batch, height, width, channels), and you wish to share parameters across space so that each filter only has one set of parameters, set 'sharedAxes = Array(1,2)'.

    Definition Classes
    SReLU → SReLU
  94. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  95. val tLeftInit: InitializationMethod

    Initialization function for the left part intercept.

    Initialization function for the left part intercept. Default is Zeros. You can also pass in corresponding string representations such as 'zero' or 'normal', etc. for simple init methods in the factory method.

    Definition Classes
    SReLU → SReLU
  96. val tRightInit: InitializationMethod

    Initialization function for the right part intercept.

    Initialization function for the right part intercept. Default is Xavier. You can also pass in corresponding string representations such as 'glorot_uniform', etc. for simple init methods in the factory method.

    Definition Classes
    SReLU → SReLU
  97. def toGraph(startNodes: ModuleNode[T]*): Graph[T]

    Definition Classes
    AbstractModule
  98. def toString(): String

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

    Attributes
    protected
    Definition Classes
    AbstractModule
  100. final def training(): SReLU.this.type

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

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

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

    Definition Classes
    KerasLayer → AbstractModule
  104. final def wait(): Unit

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

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

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

    Definition Classes
    AbstractModule

Deprecated Value Members

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

    Definition Classes
    AbstractModule
    Annotations
    @deprecated
    Deprecated

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

Inherited from Net

Inherited from bigdl.nn.keras.SReLU[T]

Inherited from IdentityOutputShape

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