Tannic
A C++ Tensor Library
Loading...
Searching...
No Matches
tannic::transformation::Repetition Struct Reference

Repetition operation along a specified axis. More...

#include <transformations.hpp>

Public Member Functions

constexpr type promote (type dtype) const
 Type promotion for repetition operation.
 
constexpr Shape transform (Shape shape) const
 Computes output shape after repetition.
 
void forward (Tensor const &, Tensor &) const
 

Public Attributes

int repeats
 
int axis
 

Detailed Description

Repetition operation along a specified axis.

Replicates the tensor data along a given axis multiple times.

Member Function Documentation

◆ forward()

void tannic::transformation::Repetition::forward ( Tensor const &  ,
Tensor  
) const

◆ promote()

constexpr type tannic::transformation::Repetition::promote ( type  dtype) const
inlineconstexpr

Type promotion for repetition operation.

Repetition does not change data type.

Parameters
dtypeOriginal tensor data type.
Returns
Same data type.

◆ transform()

constexpr Shape tannic::transformation::Repetition::transform ( Shape  shape) const
inlineconstexpr

Computes output shape after repetition.

Multiplies the size of the specified axis by repeats.

Parameters
shapeInput tensor shape.
Returns
Output shape after repetition.

Member Data Documentation

◆ axis

int tannic::transformation::Repetition::axis

◆ repeats

int tannic::transformation::Repetition::repeats

The documentation for this struct was generated from the following file: