Constructors
constructor
-
Parameters
-
-
Default value treatAsBatchInput: boolean = false
Accessors
batchSize
-
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
-
Methods
getInput
- getInput(batchIdx: number): tf.Tensor3D | tf.Tensor4D | HTMLCanvasElement
-
Parameters
Returns tf.Tensor3D
|
tf.Tensor4D
|
HTMLCanvasElement
getInputDimensions
- getInputDimensions(batchIdx: number): number[]
-
Parameters
Returns number[]
getInputHeight
- getInputHeight(batchIdx: number): number
-
Parameters
Returns number
getInputWidth
- getInputWidth(batchIdx: number): number
-
Parameters
Returns number
getReshapedInputDimensions
- getReshapedInputDimensions(batchIdx: number): Dimensions
-
Parameters
toBatchTensor
- toBatchTensor(inputSize: number, isCenterInputs?: boolean): tf.Tensor4D
-
Parameters
-
inputSize: number
-
Default value isCenterInputs: boolean = true
Returns tf.Tensor4D
The batch tensor.
Create a batch tensor from all input canvases and tensors with size [batchSize, inputSize, inputSize, 3].