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

Example usage of the Tensor class to create a 3D tensor and reduce it along an axis by finding the index of the maximum value. More...

#include <Tensor.h>
#include <iostream>
#include <vector>
#include <string>
#include <array>

Detailed Description

Example usage of the Tensor class to create a 3D tensor and reduce it along an axis by finding the index of the maximum value.

This example demonstrates how to create a 3D tensor, reduce it along a specified axis using the ReduceArgMax operation, and print the reduced values. The 3D tensor is initialized with some sample data, and the reduction operation finds the index of the maximum value along the specified axis. The output shows the original tensor, the reduced tensor, and the values of the squeezed 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