createOutputBuffers function

Map<int, Object> createOutputBuffers(
  1. List<List<int>> shapes
)

Creates output buffers matching the given output tensor shapes.

Returns a map from output index to the allocated buffer.

Implementation

Map<int, Object> createOutputBuffers(List<List<int>> shapes) {
  return {
    for (int i = 0; i < shapes.length; i++) i: allocTensorShape(shapes[i]),
  };
}