Class/Object

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

RReLU

Related Docs: object RReLU | package layers

Permalink

class RReLU[T] extends KerasLayer[Tensor[T], Tensor[T], T] with IdentityOutputShape with Net

Applies the randomized leaky rectified linear unit element-wise to the input.

f(x) = max(0,x) + a * min(0, x) where a ~ U(l, u).

In the training mode, negative inputs are multiplied by a factor drawn from a uniform random distribution U(l, u). In the evaluation mode, a RReLU behaves like a LeakyReLU with a constant mean factor a = (l + u) / 2. If l == u, a RReLU essentially becomes a LeakyReLU. Regardless of operating in in-place mode a RReLU will internally allocate an input-sized noise tensor to store random factors for negative inputs. For reference, see [Empirical Evaluation of Rectified Activations in Convolutional Network](http://arxiv.org/abs/1505.00853).

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

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

T

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

Linear Supertypes
Net, 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. RReLU
  2. Net
  3. IdentityOutputShape
  4. KerasLayer
  5. Container
  6. AbstractModule
  7. InferShape
  8. Serializable
  9. Serializable
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RReLU(lower: Double = 1.0/8, upper: Double = 1.0/3, inputShape: Shape = null)(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    Permalink

    lower

    Lower boundary of the uniform random distribution. Default is 1.0/8.

    upper

    Upper boundary of the uniform random distribution. Default is 1.0/3.

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  8. var backwardTime: Long

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

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

    Permalink
    Definition Classes
    Container → AbstractModule
  11. final def checkEngineType(): RReLU.this.type

    Permalink
    Definition Classes
    Container → AbstractModule
  12. def clearState(): RReLU.this.type

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

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

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

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

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

    Permalink
    Definition Classes
    RReLU → KerasLayer
  18. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  26. var forwardTime: Long

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  41. final def hasName: Boolean

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

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

    Permalink

    A Single Shape, does not include the batch dimension.

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    KerasLayer
  54. var line: String

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

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

    Permalink
    Definition Classes
    AbstractModule
  57. val lower: Double

    Permalink

    Lower boundary of the uniform random distribution.

    Lower boundary of the uniform random distribution. Default is 1.0/8.

  58. val modules: ArrayBuffer[AbstractModule[Activity, Activity, T]]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  78. var scaleB: Double

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

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

    Permalink
    Definition Classes
    AbstractModule
  81. final def setLine(line: String): RReLU.this.type

    Permalink
    Definition Classes
    AbstractModule
  82. final def setName(name: String): RReLU.this.type

    Permalink
    Definition Classes
    AbstractModule
  83. def setScaleB(b: Double): RReLU.this.type

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

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

    Permalink
    Definition Classes
    AbstractModule
  86. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractModule
  90. final def training(): RReLU.this.type

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

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

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

    Permalink
    Definition Classes
    KerasLayer → AbstractModule
  94. val upper: Double

    Permalink

    Upper boundary of the uniform random distribution.

    Upper boundary of the uniform random distribution. Default is 1.0/3.

  95. final def wait(): Unit

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

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

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

    Permalink
    Definition Classes
    AbstractModule

Deprecated Value Members

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