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

Sequential

class Sequential[T] extends KerasNet[T]

Linear Supertypes
KerasNet[T], Net, KerasLayer[Activity, Activity, T], Container[Activity, Activity, T], AbstractModule[Activity, Activity, T], InferShape, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Sequential
  2. KerasNet
  3. Net
  4. KerasLayer
  5. Container
  6. AbstractModule
  7. InferShape
  8. Serializable
  9. Serializable
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

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: Activity, gradOutput: Activity): Unit

    Definition Classes
    KerasLayer → AbstractModule
  7. def add(module: AbstractModule[_ <: Activity, _ <: Activity, T]): Sequential.this.type

    Add a sub-module to the sequential container.

    Add a sub-module to the sequential container.

    module

    The module to be added.

    returns

    This sequential container.

  8. def add(lambda: Lambda[T]): Sequential[T]

  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: Activity, gradOutput: Activity): Activity

    Definition Classes
    AbstractModule
  12. var backwardTime: Long

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

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

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

    Definition Classes
    Container → AbstractModule
  16. def clearGradientClipping(): Unit

    Clear gradient clipping parameters.

    Clear gradient clipping parameters. In this case, gradient clipping will not be applied. In order to take effect, it needs to be called before fit.

    Definition Classes
    KerasNet
  17. def clearState(): Sequential.this.type

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

    Definition Classes
    AbstractModule
  19. def clone(): AnyRef

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

    Definition Classes
    AbstractModule
  21. def compile(optimizer: OptimMethod[T], loss: (Variable[T], Variable[T]) ⇒ Variable[T])(implicit ev: TensorNumeric[T]): Unit

    Definition Classes
    KerasNet
  22. def compile(optimizer: OptimMethod[T], loss: (Variable[T], Variable[T]) ⇒ Variable[T], metrics: List[ValidationMethod[T]])(implicit ev: TensorNumeric[T]): Unit

    Definition Classes
    KerasNet
  23. def compile(optimizer: String, loss: String)(implicit ev: TensorNumeric[T]): Unit

    Definition Classes
    KerasNet
  24. def compile(optimizer: String, loss: String, metrics: List[String])(implicit ev: TensorNumeric[T]): Unit

    Alternatively, one can pass in the corresponding Keras-Style string representations when calling compile.

    Alternatively, one can pass in the corresponding Keras-Style string representations when calling compile.

    For example: optimizer = "sgd", loss = "mse", metrics = List("accuracy")

    Definition Classes
    KerasNet
  25. def compile(optimizer: OptimMethod[T], loss: Criterion[T], metrics: List[ValidationMethod[T]] = null)(implicit ev: TensorNumeric[T]): Unit

    Configure the learning process.

    Configure the learning process. It MUST be called before fit or evaluate.

    optimizer

    Optimization method to be used.

    loss

    Criterion to be used.

    metrics

    Validation method(s) to be used. Default is null if no validation is needed.

    Definition Classes
    KerasNet
  26. def computeOutputShape(inputShape: Shape): Shape

    Definition Classes
    Sequential → KerasLayer → InferShape
  27. def doBuild(inputShape: Shape): bigdl.nn.Sequential[T]

    Definition Classes
    Sequential → KerasLayer
  28. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    Container → AbstractModule → AnyRef → Any
  30. def evaluate(x: LocalDataSet[MiniBatch[T]])(implicit ev: TensorNumeric[T]): Array[(ValidationResult, ValidationMethod[T])]

    Evaluate a model in local mode.

    Evaluate a model in local mode.

    x

    Evaluation dataset, LocalDataSet.

    Definition Classes
    KerasNet
  31. def evaluate(x: RDD[Sample[T]], batchSize: Int)(implicit ev: TensorNumeric[T]): Array[(ValidationResult, ValidationMethod[T])]

    Evaluate a model on a given dataset.

    Evaluate a model on a given dataset.

    x

    Evaluation dataset, RDD of Sample.

    batchSize

    Number of samples per batch.

    Definition Classes
    KerasNet
  32. final def evaluate(): Sequential.this.type

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

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

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

    Definition Classes
    AbstractModule
  36. def finalize(): Unit

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

    Definition Classes
    Container
  38. def fit(x: ImageSet, batchSize: Int, nbEpoch: Int)(implicit ev: TensorNumeric[T]): Unit

    Definition Classes
    KerasNet
  39. def fit(x: ImageSet, batchSize: Int, nbEpoch: Int, validationData: ImageSet)(implicit ev: TensorNumeric[T]): Unit

    Definition Classes
    KerasNet
  40. def fit(x: RDD[Sample[T]], batchSize: Int = 32, nbEpoch: Int = 10, validationData: RDD[Sample[T]] = null)(implicit ev: TensorNumeric[T]): Unit

    Train a model for a fixed number of epochs on a dataset.

    Train a model for a fixed number of epochs on a dataset.

    x

    Training dataset, RDD of Sample.

    batchSize

    Number of samples per gradient update. Default is 32.

    nbEpoch

    Number of iterations to train. Default is 10.

    validationData

    RDD of Sample, or null if validation is not configured. Default is null.

    Definition Classes
    KerasNet
  41. def fit[D](x: DataSet[D], nbEpoch: Int)(implicit arg0: ClassTag[D], ev: TensorNumeric[T]): Unit

    Definition Classes
    KerasNet
  42. def fit[D](x: DataSet[D], nbEpoch: Int, validationData: DataSet[MiniBatch[T]])(implicit arg0: ClassTag[D], ev: TensorNumeric[T]): Unit

    Train a model for a fixed number of epochs on a dataset.

    Train a model for a fixed number of epochs on a dataset.

    x

    Training dataset. If x is an instance of LocalDataSet, train in local mode.

    nbEpoch

    Number of iterations to train.

    validationData

    Dataset for validation, or null if validation is not configured.

    Definition Classes
    KerasNet
  43. final def forward(input: Activity): Activity

    Definition Classes
    AbstractModule
  44. var forwardTime: Long

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

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

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

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

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

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

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

    Definition Classes
    InferShape
  53. def getParametersTable(): Table

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

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

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

    Definition Classes
    AbstractModule
  57. def getSubModules(): List[AbstractModule[Activity, Activity, T]]

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

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

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

    Definition Classes
    AbstractModule
  61. var gradInput: Activity

    Definition Classes
    AbstractModule
  62. final def hasName: Boolean

    Definition Classes
    AbstractModule
  63. def hashCode(): Int

    Definition Classes
    Container → AbstractModule → AnyRef → Any
  64. def inputs(first: (ModuleNode[T], Int), nodesWithIndex: (ModuleNode[T], Int)*): ModuleNode[T]

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

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

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

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

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

    Definition Classes
    Any
  70. def isKerasStyle(): Boolean

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

    Definition Classes
    AbstractModule
  72. def labor: AbstractModule[Activity, Activity, T]

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

    Definition Classes
    KerasLayer
  74. var line: String

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

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

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

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

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

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

    Definition Classes
    AnyRef
  81. var output: Activity

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

    Definition Classes
    Container → AbstractModule
  83. def predict(x: LocalDataSet[MiniBatch[T]], batchSize: Int)(implicit ev: TensorNumeric[T]): Array[Activity]

    Use a model to do prediction in local mode.

    Use a model to do prediction in local mode.

    x

    Prediction data, LocalDataSet.

    Definition Classes
    KerasNet
  84. def predict(x: RDD[Sample[T]], batchSize: Int)(implicit ev: TensorNumeric[T]): RDD[Activity]

    Use a model to do prediction.

    Use a model to do prediction.

    x

    Prediction data, RDD of Sample.

    batchSize

    Number of samples per batch.

    Definition Classes
    KerasNet
  85. final def predict(dataset: RDD[Sample[T]], batchSize: Int, shareBuffer: Boolean): RDD[Activity]

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

    Definition Classes
    AbstractModule
  87. def predictClasses(x: RDD[Sample[T]], batchSize: Int = 32, zeroBasedLabel: Boolean = true): RDD[Int]

    Use a model to predict for classes.

    Use a model to predict for classes. By default, label predictions start from 0.

    x

    Prediction data, RDD of Sample.

    batchSize

    Number of samples per batch. Default is 32.

    zeroBasedLabel

    Boolean. Whether result labels start from 0. Default is true. If false, result labels start from 1.

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

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

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

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

    Definition Classes
    AbstractModule
  92. def release(): Unit

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

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

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

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

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

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

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

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

    Definition Classes
    AbstractModule
  101. var scaleB: Double

    Attributes
    protected
    Definition Classes
    AbstractModule
  102. var scaleW: Double

    Attributes
    protected
    Definition Classes
    AbstractModule
  103. def setCheckpoint(path: String, overWrite: Boolean = true): Unit

    Configure checkpoint settings to write snapshots every epoch during the training process.

    Configure checkpoint settings to write snapshots every epoch during the training process. In order to take effect, it needs to be called before fit.

    path

    The path to save snapshots. Make sure this path exists beforehand.

    overWrite

    Whether to overwrite existing snapshots in the given path. Default is true.

    Definition Classes
    KerasNet
  104. def setConstantGradientClipping(min: Float, max: Float): Unit

    Set constant gradient clipping during the training process.

    Set constant gradient clipping during the training process. In order to take effect, it needs to be called before fit.

    min

    The minimum value to clip by. Double.

    max

    The maximum value to clip by. Double.

    Definition Classes
    KerasNet
  105. final def setExtraParameter(extraParam: Array[Tensor[T]]): Sequential.this.type

    Definition Classes
    AbstractModule
  106. def setGradientClippingByL2Norm(clipNorm: Float): Unit

    Clip gradient to a maximum L2-Norm during the training process.

    Clip gradient to a maximum L2-Norm during the training process. In order to take effect, it needs to be called before fit.

    clipNorm

    Gradient L2-Norm threshold. Double.

    Definition Classes
    KerasNet
  107. final def setLine(line: String): Sequential.this.type

    Definition Classes
    AbstractModule
  108. final def setName(name: String): Sequential.this.type

    Definition Classes
    AbstractModule
  109. def setScaleB(b: Double): Sequential.this.type

    Definition Classes
    Container → AbstractModule
  110. def setScaleW(w: Double): Sequential.this.type

    Definition Classes
    Container → AbstractModule
  111. def setTensorBoard(logDir: String, appName: String): Unit

    Set summary information during the training process for visualization purposes.

    Set summary information during the training process for visualization purposes. Saved summary can be viewed via TensorBoard. In order to take effect, it needs to be called before fit.

    Training summary will be saved to 'logDir/appName/train' and validation summary (if any) will be saved to 'logDir/appName/validation'.

    logDir

    The base directory path to store training and validation logs.

    appName

    The name of the application.

    Definition Classes
    KerasNet
  112. final def setWeightsBias(newWeights: Array[Tensor[T]]): Sequential.this.type

    Definition Classes
    AbstractModule
  113. def summary(lineLength: Int = 120, positions: Array[Double] = Array(.33, .55, .67, 1)): Unit

    Print out the summary information of an Analytics Zoo Keras Model.

    Print out the summary information of an Analytics Zoo Keras Model.

    For each layer in the model, there will be a separate row containing four columns: Layer (type) Output Shape Param # Connected to

    In addition, total number of parameters of this model, separated into trainable and non-trainable counts, will be printed out after the table.

    lineLength

    The total length of one row. Default is 120.

    positions

    The maximum absolute length proportion(%) of each field. Array of Double of length 4. Usually you don't need to adjust this parameter. Default is Array(.33, .55, .67, 1), meaning that the first field will occupy up to 33% of lineLength, the second field will occupy up to (55-33)% of lineLength, the third field will occupy up to (67-55)% of lineLength, the fourth field will occupy the remaining line (100-67)%. If the field has a larger length, the remaining part will be trimmed. If the field has a smaller length, the remaining part will be white spaces.

    Definition Classes
    SequentialKerasNet
  114. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Definition Classes
    AbstractModule
  116. def toModel(): Model[T]

    Definition Classes
    SequentialKerasNet
  117. def toString(): String

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

    Attributes
    protected
    Definition Classes
    AbstractModule
  119. final def training(): Sequential.this.type

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

    Definition Classes
    Container → AbstractModule
  121. def updateGradInput(input: Activity, gradOutput: Activity): Activity

    Definition Classes
    KerasLayer → AbstractModule
  122. def updateOutput(input: Activity): Activity

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

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

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

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

    Definition Classes
    AbstractModule

Deprecated Value Members

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

    Definition Classes
    AbstractModule
    Annotations
    @deprecated
    Deprecated

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

Inherited from KerasNet[T]

Inherited from Net

Inherited from KerasLayer[Activity, Activity, T]

Inherited from Container[Activity, Activity, T]

Inherited from AbstractModule[Activity, Activity, T]

Inherited from InferShape

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped