Constructors
constructor
- new NetInput(inputs, treatAsBatchInput?): NetInput
Accessors
batchSize
- get batchSize(): number
Returns number
canvases
- get canvases(): HTMLCanvasElement[]
Returns HTMLCanvasElement[]
inputDimensions
- get inputDimensions(): number[][]
Returns number[][]
inputSize
- get inputSize(): undefined | number
Returns undefined | number
isBatchInput
- get isBatchInput(): boolean
Returns boolean
Methods
getInputDimensions
- getInputDimensions(batchIdx): number[]
Returns number[]
getInputHeight
- getInputHeight(batchIdx): number
Returns number
getInputWidth
- getInputWidth(batchIdx): number
Returns number
getReshapedInputDimensions
toBatchTensor
- toBatchTensor(inputSize, isCenterInputs?): Tensor4D
Parameters
- inputSize: number
- isCenterInputs: boolean = true
The batch tensor.
Create a batch tensor from all input canvases and tensors with size [batchSize, inputSize, inputSize, 3].