createOutputBuffers function
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]),
};
}