Class/Object

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

TFNet

Related Docs: object TFNet | package net

Permalink

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

TFNet wraps a tensorflow subgraph as a layer, and use tensorflow to calculate the layer's output.

This subgraph should not contain any tensorflow Variable and the input/output must be numeric types

When used with other layers for training, there should be no trainable layer before this one, as the gradInput of this layer is always zero.

Linear Supertypes
Predictable[Float], AbstractModule[Activity, Activity, Float], InferShape, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TFNet
  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

Instance Constructors

  1. new TFNet(graphDef: TFGraphHolder, graphMeta: Meta, config: Array[Int])

    Permalink

    graphDef

    serialized representation of a graph

Type Members

  1. class ResourceManager extends Serializable

    Permalink

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
    TFNet → 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(): TFNet.this.type

    Permalink
    Definition Classes
    TFNet → 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(): TFNet.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
    TFNetPredictable
  16. final def evaluate(dataSet: LocalDataSet[MiniBatch[Float]], vMethods: Array[_ <: ValidationMethod[Float]]): Array[(ValidationResult, ValidationMethod[Float])]

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

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

    Permalink
    Definition Classes
    AbstractModule
  19. def evaluate(): TFNet.this.type

    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
    TFNet → 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*): TFNet.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. val graphMeta: Meta

    Permalink
  40. final def hasName: Boolean

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

    Permalink
    Definition Classes
    AbstractModule → AnyRef → Any
  42. val inputNames: Array[String]

    Permalink
  43. def inputs(first: (ModuleNode[Float], Int), nodesWithIndex: (ModuleNode[Float], Int)*): ModuleNode[Float]

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  48. var line: String

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

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

    Permalink
    Definition Classes
    AbstractModule
  51. val module: Module[Float]

    Permalink
    Attributes
    protected
    Definition Classes
    TFNetPredictable
  52. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  55. var output: Activity

    Permalink
    Definition Classes
    AbstractModule
  56. val outputNames: Array[String]

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

    Permalink
    Definition Classes
    TFNet → 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 processInputs(first: (ModuleNode[Float], Int), nodesWithIndex: (ModuleNode[Float], Int)*): ModuleNode[Float]

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

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

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

    Permalink
    Definition Classes
    TFNet → AbstractModule
  76. def reset(): Unit

    Permalink
    Definition Classes
    TFNet → AbstractModule
  77. def resetTimes(): Unit

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

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

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

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

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

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

    Permalink
    Definition Classes
    AbstractModule
  84. var scaleB: Double

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

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

    Permalink
    Definition Classes
    AbstractModule
  87. final def setLine(line: String): TFNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  88. final def setName(name: String): TFNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  89. def setScaleB(b: Double): TFNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  90. def setScaleW(w: Double): TFNet.this.type

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractModule
  97. def training(): TFNet.this.type

    Permalink
    Definition Classes
    AbstractModule
  98. def unFreeze(names: String*): TFNet.this.type

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

    Permalink
    Definition Classes
    TFNet → AbstractModule
  100. def updateOutput(input: Activity): Activity

    Permalink
    Definition Classes
    TFNet → AbstractModule
  101. final def wait(): Unit

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

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

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

    Permalink
    Definition Classes
    AbstractModule

Deprecated Value Members

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