Class/Object

com.intel.analytics.zoo.pipeline.api.net

TorchNet

Related Docs: object TorchNet | package net

Permalink

class TorchNet extends AbstractModule[Activity, Activity, Float] with Predictable[Float]

TorchNet wraps a TorchScript model as a single layer.

Linear Supertypes
Predictable[Float], AbstractModule[Activity, Activity, Float], InferShape, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TorchNet
  2. Predictable
  3. AbstractModule
  4. InferShape
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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

    Permalink
    Definition Classes
    AbstractModule
  5. def apply(name: String): Option[AbstractModule[Activity, Activity, Float]]

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

    Permalink
    Definition Classes
    Any
  7. def backward(input: Activity, gradOutput: Activity): Activity

    Permalink
    Definition Classes
    AbstractModule
  8. var backwardTime: Long

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractModule
  9. def clearState(): TorchNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  10. final def clone(deepCopy: Boolean): AbstractModule[Activity, Activity, Float]

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

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

    Permalink
    Definition Classes
    AbstractModule
  13. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AbstractModule → AnyRef → Any
  15. implicit val ev: NumericFloat.type

    Permalink
    Definition Classes
    TorchNetPredictable
  16. def evaluate(): TorchNet.this.type

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

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

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

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

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

    Permalink
    Definition Classes
    TorchNet → AnyRef
  22. final def forward(input: Activity): Activity

    Permalink
    Definition Classes
    AbstractModule
  23. var forwardTime: Long

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

    Permalink
    Definition Classes
    AbstractModule
  25. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AbstractModule
  27. final def getInputShape(): Shape

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  32. final def getPrintName(): String

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  37. final def getWeightsBias(): Array[Tensor[Float]]

    Permalink
    Definition Classes
    AbstractModule
  38. var gradInput: Activity

    Permalink
    Definition Classes
    AbstractModule
  39. var gradients: Tensor[Float]

    Permalink
  40. final def hasName: Boolean

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

    Permalink
    Definition Classes
    AbstractModule → AnyRef → Any
  42. def inputs(first: (ModuleNode[Float], Int), nodesWithIndex: (ModuleNode[Float], Int)*): ModuleNode[Float]

    Permalink
    Definition Classes
    AbstractModule
  43. def inputs(nodes: Array[ModuleNode[Float]]): ModuleNode[Float]

    Permalink
    Definition Classes
    AbstractModule
  44. def inputs(nodes: ModuleNode[Float]*): ModuleNode[Float]

    Permalink
    Definition Classes
    AbstractModule
  45. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  46. final def isTraining(): Boolean

    Permalink
    Definition Classes
    AbstractModule
  47. var line: String

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

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

    Permalink
    Definition Classes
    AbstractModule
  50. val logger: Logger

    Permalink
  51. val module: Module[Float]

    Permalink
    Attributes
    protected
    Definition Classes
    TorchNetPredictable
  52. lazy val nativeRef: Long

    Permalink

    sequential id in cpp: std::vector<std::shared_ptr<torch::jit::script::Module>> handles; mark the model as transient and reload TorchNet from byteArray on executors

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

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

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

    Permalink
    Definition Classes
    AnyRef
  56. var output: Activity

    Permalink
    Definition Classes
    AbstractModule
  57. def parameters(): (Array[Tensor[Float]], Array[Tensor[Float]])

    Permalink
    Definition Classes
    TorchNet → AbstractModule
  58. def predict(x: TextSet): TextSet

    Permalink

    The default batchPerThread is 4.

    The default batchPerThread is 4. For DistributedTextSet, the total batchSize is batchPerThread * rdd.getNumPartitions. For LocalTextSet, the total batchSize is batchPerThread * numOfCores.

    x

    Prediction data, TextSet.

    Definition Classes
    Predictable
  59. def predict(x: TextSet, batchPerThread: Int): TextSet

    Permalink

    Use a model to do prediction on TextSet.

    Use a model to do prediction on TextSet.

    x

    Prediction data, TextSet.

    batchPerThread

    The total batch size is batchPerThread * rdd.getNumPartitions(distributed mode) or batchPerThread * numOfCores(local mode)

    Definition Classes
    Predictable
  60. def predict(x: ImageSet): ImageSet

    Permalink

    The default batchPerThread is 4.

    The default batchPerThread is 4. For DistributedImageSet, the total batchSize is batchPerThread * rdd.getNumPartitions. For LocalImageSet, the total batchSize is batchPerThread * numOfCores.

    x

    Prediction data, ImageSet.

    Definition Classes
    Predictable
  61. def predict(x: ImageSet, batchPerThread: Int): ImageSet

    Permalink

    Use a model to do prediction on ImageSet.

    Use a model to do prediction on ImageSet.

    x

    Prediction data, ImageSet.

    batchPerThread

    The total batch size is batchPerThread * rdd.getNumPartitions(distributed mode) or batchPerThread * numOfCores(local mode)

    Definition Classes
    Predictable
  62. def predict(x: Array[Sample[Float]])(implicit ev: TensorNumeric[Float]): Array[Activity]

    Permalink

    Use a model to do prediction in local mode.

    Use a model to do prediction in local mode. The total batch size is batchPerThread * numOfCores, and batchPerThread is 4 by default.

    x

    Prediction data, array of Sample.

    Definition Classes
    Predictable
  63. def predict(x: Array[Sample[Float]], batchPerThread: Int)(implicit ev: TensorNumeric[Float]): Array[Activity]

    Permalink

    Use a model to do prediction in local mode.

    Use a model to do prediction in local mode.

    x

    Prediction data, array of Sample.

    batchPerThread

    The total batchSize is batchPerThread * numOfCores.

    Definition Classes
    Predictable
  64. def predict(x: LocalDataSet[MiniBatch[Float]])(implicit ev: TensorNumeric[Float]): Array[Activity]

    Permalink

    Use a model to do prediction in local mode.

    Use a model to do prediction in local mode. The total batch size is batchPerThread * numOfCores, and batchPerThread is 4 by default.

    x

    Prediction data, LocalDataSet.

    Definition Classes
    Predictable
  65. def predict(x: LocalDataSet[MiniBatch[Float]], batchPerThread: Int)(implicit ev: TensorNumeric[Float]): Array[Activity]

    Permalink

    Use a model to do prediction in local mode.

    Use a model to do prediction in local mode.

    x

    Prediction data, LocalDataSet.

    batchPerThread

    The total batchSize is batchPerThread * numOfCores.

    Definition Classes
    Predictable
  66. def predict(x: RDD[Sample[Float]])(implicit ev: TensorNumeric[Float]): RDD[Activity]

    Permalink

    Use a model to do prediction for RDD.

    Use a model to do prediction for RDD. The default batchPerThread is 4, and the total batchSize is batchPerThread * rdd.getNumPartitions.

    x

    Prediction data, RDD of Sample.

    Definition Classes
    Predictable
  67. def predict(x: RDD[Sample[Float]], batchPerThread: Int)(implicit ev: TensorNumeric[Float]): RDD[Activity]

    Permalink

    Use a model to do prediction for RDD.

    Use a model to do prediction for RDD.

    x

    Prediction data, RDD of Sample.

    batchPerThread

    The total batchSize is batchPerThread * rdd.getNumPartitions.

    Definition Classes
    Predictable
  68. final def predict(dataset: RDD[Sample[Float]], batchSize: Int, shareBuffer: Boolean): RDD[Activity]

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

    Permalink
    Definition Classes
    AbstractModule
  70. def predictClasses(x: RDD[Sample[Float]], batchPerThread: Int = 4, zeroBasedLabel: Boolean = true): RDD[Int]

    Permalink

    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.

    batchPerThread

    The default batchPerThread is 4, and the total batchSize is batchPerThread * rdd.getNumPartitions.

    zeroBasedLabel

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

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

    Permalink
    Definition Classes
    AbstractModule
  72. def predictMiniBatch(x: RDD[MiniBatch[Float]])(implicit ev: TensorNumeric[Float]): RDD[Activity]

    Permalink
    Definition Classes
    Predictable
  73. def processInputs(first: (ModuleNode[Float], Int), nodesWithIndex: (ModuleNode[Float], Int)*): ModuleNode[Float]

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  78. def resetTimes(): Unit

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  82. def savePytorch(path: String, overWrite: Boolean = false): Unit

    Permalink

    export the model to path as a torch script module.

  83. final def saveTF(inputs: Seq[(String, Seq[Int])], path: String, byteOrder: ByteOrder, dataFormat: TensorflowDataFormat): TorchNet.this.type

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

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

    Permalink
    Definition Classes
    AbstractModule
  86. var scaleB: Double

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

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractModule
  88. final def setExtraParameter(extraParam: Array[Tensor[Float]]): TorchNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  89. final def setLine(line: String): TorchNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  90. final def setName(name: String): TorchNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  91. def setScaleB(b: Double): TorchNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  92. def setScaleW(w: Double): TorchNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  93. final def setWeightsBias(newWeights: Array[Tensor[Float]]): TorchNet.this.type

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

    Permalink
    Definition Classes
    AnyRef
  95. implicit val tag: ClassTag[Float]

    Permalink
    Definition Classes
    TorchNetPredictable
  96. def toGraph(startNodes: ModuleNode[Float]*): Graph[Float]

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractModule
  99. def training(): TorchNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  100. def unFreeze(names: String*): TorchNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  101. def updateGradInput(input: Activity, gradOutput: Activity): Activity

    Permalink
    Definition Classes
    TorchNet → AbstractModule
  102. def updateOutput(input: Activity): Activity

    Permalink
    Definition Classes
    TorchNet → AbstractModule
  103. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  106. var weights: Tensor[Float]

    Permalink
  107. def zeroGradParameters(): Unit

    Permalink
    Definition Classes
    AbstractModule

Deprecated Value Members

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

    Permalink
    Definition Classes
    AbstractModule
    Annotations
    @deprecated
    Deprecated

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

Inherited from Predictable[Float]

Inherited from AbstractModule[Activity, Activity, Float]

Inherited from InferShape

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped