createNHWCTensor4D function

List<List<List<List<double>>>> createNHWCTensor4D(
  1. int height,
  2. int width
)

Creates a pre-allocated [1][height][width][3] tensor structure.

Implementation

List<List<List<List<double>>>> createNHWCTensor4D(int height, int width) {
  return allocTensorShape([1, height, width, 3])
      as List<List<List<List<double>>>>;
}