Concatenation operation along a specified axis.
More...
#include <transformations.hpp>
Concatenation operation along a specified axis.
Concatenates two tensors of the same rank and dtype along a given axis.
◆ forward()
void tannic::transformation::Concatenation::forward |
( |
Tensor const & |
, |
|
|
Tensor const & |
, |
|
|
Tensor & |
|
|
) |
| const |
◆ promote()
constexpr auto tannic::transformation::Concatenation::promote |
( |
type |
first, |
|
|
type |
second |
|
) |
| const |
|
inlineconstexpr |
Type promotion for concatenation.
Requires both tensors to have identical data types.
- Parameters
-
first | Left tensor dtype. |
second | Right tensor dtype. |
- Returns
- Data type (same as inputs).
◆ transform()
constexpr Shape tannic::transformation::Concatenation::transform |
( |
Shape const & |
first, |
|
|
Shape const & |
second |
|
) |
| |
|
inlineconstexpr |
Computes output shape after concatenation.
Validates that all dimensions except the concatenation axis are equal. Output shape is input shapes with concatenation axis dimension summed.
- Parameters
-
first | Left tensor shape. |
second | Right tensor shape. |
- Returns
- Output shape after concatenation.
◆ axis
int tannic::transformation::Concatenation::axis |
The documentation for this struct was generated from the following file: