# Class NetInput

#### Hierarchy

- NetInput

- Defined in dom/NetInput.ts:11

#####
Index

### Constructors

constructor

### Accessors

batchSize
canvases
imageTensors
inputDimensions
inputSize
isBatchInput
reshapedInputDimensions

### Methods

getInput
getInputDimensions
getInputHeight
getInputWidth
getReshapedInputDimensions
toBatchTensor

## Constructors

### constructor

- new NetInput(inputs: any[], treatAsBatchInput?: boolean): NetInput

- #### Parameters

  - ##### inputs: any[]

  - ##### treatAsBatchInput: boolean = false

  #### Returns NetInput

  - Defined in dom/NetInput.ts:24

## Accessors

### batchSize

- get batchSize(): number

- #### Returns number

  - Defined in dom/NetInput.ts:69

### canvases

- get canvases(): HTMLCanvasElement[]

- #### Returns HTMLCanvasElement[]

  - Defined in dom/NetInput.ts:61

### imageTensors

- get imageTensors(): any[]

- #### Returns any[]

  - Defined in dom/NetInput.ts:57

### inputDimensions

- get inputDimensions(): number[][]

- #### Returns number[][]

  - Defined in dom/NetInput.ts:73

### inputSize

- get inputSize(): undefined | number

- #### Returns undefined | number

  - Defined in dom/NetInput.ts:77

### isBatchInput

- get isBatchInput(): boolean

- #### Returns boolean

  - Defined in dom/NetInput.ts:65

### reshapedInputDimensions

- get reshapedInputDimensions(): Dimensions[]

- #### Returns Dimensions[]

  - Defined in dom/NetInput.ts:81

## Methods

### getInput

- getInput(batchIdx: number): any

- #### Parameters

  - ##### batchIdx: number

  #### Returns any

  - Defined in dom/NetInput.ts:87

### getInputDimensions

- getInputDimensions(batchIdx: number): number[]

- #### Parameters

  - ##### batchIdx: number

  #### Returns number[]

  - Defined in dom/NetInput.ts:91

### getInputHeight

- getInputHeight(batchIdx: number): number

- #### Parameters

  - ##### batchIdx: number

  #### Returns number

  - Defined in dom/NetInput.ts:95

### getInputWidth

- getInputWidth(batchIdx: number): number

- #### Parameters

  - ##### batchIdx: number

  #### Returns number

  - Defined in dom/NetInput.ts:99

### getReshapedInputDimensions

- getReshapedInputDimensions(batchIdx: number): Dimensions

- #### Parameters

  - ##### batchIdx: number

  #### Returns Dimensions

  - Defined in dom/NetInput.ts:103

### toBatchTensor

- toBatchTensor(inputSize: number, isCenterInputs?: boolean): Tensor4D

- Create a batch tensor from all input canvases and tensors with size [batchSize, inputSize, inputSize, 3].

  ### Returns

  The batch tensor.

  #### Parameters

  - ##### inputSize: number

    Height and width of the tensor.

  - ##### isCenterInputs: boolean = true

  #### Returns Tensor4D

  - Defined in dom/NetInput.ts:122