Class/Object

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

SReLU

Related Docs: object SReLU | package layers

Permalink

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

Instance Constructors

  1. new SReLU(tLeftInit: InitializationMethod = Zeros, aLeftInit: InitializationMethod = Xavier, tRightInit: InitializationMethod = Xavier, aRightInit: InitializationMethod = Ones, sharedAxes: Array[Int] = null, inputShape: Shape = null)(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    Permalink

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

    Permalink

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

    Permalink

    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
  6. def accGradParameters(input: Tensor[T], gradOutput: Tensor[T]): Unit

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

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

    Permalink
    Definition Classes
    Any
  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. def build(calcInputShape: Shape): Shape

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  28. var forwardTime: Long

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

    Permalink
    Definition Classes
    Container → AbstractModule
  30. final def getClass(): Class[_]

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  43. final def hasName: Boolean

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

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

    Permalink

    A Single Shape, does not include the batch dimension.

    A Single Shape, does not include the batch dimension.

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    KerasLayer
  56. var line: String

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  71. def reset(): Unit

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  79. var scaleB: Double

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  87. val sharedAxes: Array[Int]

    Permalink

    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
  88. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  89. val tLeftInit: InitializationMethod

    Permalink

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

    Permalink

    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
  91. def toGraph(startNodes: ModuleNode[T]*): Graph[T]

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule

Deprecated Value Members

  1. final def save(path: String, overWrite: Boolean): SReLU.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 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