iVS3D v2.0.0
Loading...
Searching...
No Matches
reduce.cpp File Reference

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>

Detailed Description

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.

Author
Dominik Wüst (domin.nosp@m.ik.w.nosp@m.uest@.nosp@m.iosb.nosp@m..frau.nosp@m.nhof.nosp@m.er.de)
Date
May 2025