![]() |
iVS3D v2.0.0
|
Example usage of the Tensor class to create a 2D tensor and reduce it along an axis by summing the values. More...
#include <Tensor.h>#include <ReduceOps.h>#include <iostream>#include <vector>#include <string>#include <array>Example usage of the Tensor class to create a 2D tensor and reduce it along an axis by summing the values.
This example demonstrates how to create a 2D tensor, reduce it along a specified axis using the ReduceSum operation, and print the reduced values. The 2D tensor is initialized with some sample data, and the reduction operation sums the values along the specified axis. The output shows the original tensor, the reduced tensor, and the values of the reduced tensor.