Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NetInput

Hierarchy

  • NetInput

Index

Constructors

constructor

  • Parameters

    Returns NetInput

Accessors

batchSize

  • get batchSize(): number
  • Returns number

canvases

  • get canvases(): HTMLCanvasElement[]
  • Returns HTMLCanvasElement[]

imageTensors

  • get imageTensors(): Array<tf.Tensor3D | tf.Tensor4D>
  • Returns Array<tf.Tensor3D | tf.Tensor4D>

inputDimensions

  • get inputDimensions(): number[][]
  • Returns number[][]

inputSize

  • get inputSize(): number | undefined
  • Returns number | undefined

isBatchInput

  • get isBatchInput(): boolean
  • Returns boolean

reshapedInputDimensions

  • Returns Dimensions[]

Methods

getInput

  • getInput(batchIdx: number): tf.Tensor3D | tf.Tensor4D | HTMLCanvasElement
  • Parameters

    • batchIdx: number

    Returns tf.Tensor3D | tf.Tensor4D | HTMLCanvasElement

getInputDimensions

  • getInputDimensions(batchIdx: number): number[]
  • Parameters

    • batchIdx: number

    Returns number[]

getInputHeight

  • getInputHeight(batchIdx: number): number
  • Parameters

    • batchIdx: number

    Returns number

getInputWidth

  • getInputWidth(batchIdx: number): number
  • Parameters

    • batchIdx: number

    Returns number

getReshapedInputDimensions

  • getReshapedInputDimensions(batchIdx: number): Dimensions
  • Parameters

    • batchIdx: number

    Returns Dimensions

toBatchTensor

  • toBatchTensor(inputSize: number, isCenterInputs?: boolean): tf.Tensor4D
  • Create a batch tensor from all input canvases and tensors with size [batchSize, inputSize, inputSize, 3].

    Parameters

    • inputSize: number

      Height and width of the tensor.

    • Default value isCenterInputs: boolean = true

    Returns tf.Tensor4D

    The batch tensor.

Generated using TypeDoc