tenzr::ConvolutionNode¶
#include <node.h>
Inherits from tenzr::Node, std::enable_shared_from_this< Node >
Public Functions¶
| Name | |
|---|---|
| ConvolutionNode(std::shared_ptr< Node > input, std::shared_ptr< Node > kernel, std::vector< int64_t > window_strides, std::vector< int64_t > lhs_dilation, std::vector< int64_t > rhs_dilation, std::vector< int64_t > padding_low, std::vector< int64_t > padding_high) | |
| virtual std::string | OpName() const override StableHLO-style name of this node's operation. |
| const std::shared_ptr< Node > & | Input() const The input operand. |
| const std::shared_ptr< Node > & | Kernel() const The convolution kernel. |
| const std::vector< int64_t > & | WindowStrides() const Window strides per spatial dimension. |
| const std::vector< int64_t > & | LhsDilation() const Dilation of the left-hand operand per dimension. |
| const std::vector< int64_t > & | RhsDilation() const Dilation of the right-hand operand per dimension. |
| const std::vector< int64_t > & | PaddingLow() const Low edge padding per dimension. |
| const std::vector< int64_t > & | PaddingHigh() const High edge padding per dimension. |
Additional inherited members¶
Public Functions inherited from tenzr::Node
| Name | |
|---|---|
| Node(NodeKind kind, Shape shape, DType dtype, ShardingSpec sharding =ShardingSpec::Replicated()) | |
| virtual | ~Node() =default |
| NodeKind | Kind() const The node's operation kind. |
| const Shape & | shape() const The node's output shape. |
| DType | Dtype() const The node's output dtype. |
| const ShardingSpec & | Sharding() const The node's sharding spec. |
| void | SetSharding(ShardingSpec spec) Replace the sharding spec. |
| const StridedLayout & | Layout() const The node's strided layout. |
| void | SetLayout(StridedLayout layout) Replace the layout. |
| const std::vector< std::shared_ptr< Node > > & | Inputs() const The node's input operands. |
| uint64_t | Id() const The node's unique id. |
Protected Functions inherited from tenzr::Node
| Name | |
|---|---|
| uint64_t | NextId() |
Protected Attributes inherited from tenzr::Node
| Name | |
|---|---|
| NodeKind | kind_ |
| Shape | shape_ |
| DType | dtype_ |
| ShardingSpec | sharding_ |
| StridedLayout | layout_ |
| std::vector< std::shared_ptr< Node > > | inputs_ |
| uint64_t | id_ |
Detailed Description¶
N-dimensional convolution of an input with a kernel, parameterized by window strides, dilations, and edge padding.
Public Functions Documentation¶
function ConvolutionNode¶
ConvolutionNode(
std::shared_ptr< Node > input,
std::shared_ptr< Node > kernel,
std::vector< int64_t > window_strides,
std::vector< int64_t > lhs_dilation,
std::vector< int64_t > rhs_dilation,
std::vector< int64_t > padding_low,
std::vector< int64_t > padding_high
)
Parameters:
- input NCHW input node.
- kernel OIHW kernel node.
- window_strides Window strides.
- lhs_dilation Input dilation.
- rhs_dilation Kernel dilation.
- padding_low Low edge padding.
- padding_high High edge padding.
Create an NCHW convolution node, inferring the output spatial dimensions.
function OpName¶
StableHLO-style name of this node's operation.
Reimplements: tenzr::Node::OpName
function Input¶
The input operand.
function Kernel¶
The convolution kernel.
function WindowStrides¶
Window strides per spatial dimension.
function LhsDilation¶
Dilation of the left-hand operand per dimension.
function RhsDilation¶
Dilation of the right-hand operand per dimension.
function PaddingLow¶
Low edge padding per dimension.
function PaddingHigh¶
High edge padding per dimension.