NEML2 2.0.0
Loading...
Searching...
No Matches
TraceableSize Struct Reference

Traceable size. More...

Detailed Description

Traceable size.

Similar to neml2::TraceableTensorShape, but only for a single dimension.

See also
neml2::TraceableTensorShape

#include <types.h>

Inheritance diagram for TraceableSize:

Public Member Functions

const torch::Tensor * traceable () const noexcept
 
Size concrete () const
 
torch::Tensor as_tensor () const
 

Member Function Documentation

◆ as_tensor()

torch::Tensor as_tensor ( ) const
Returns
the size represented as a scalar tensor (possibly traceable)

◆ concrete()

Size concrete ( ) const
Returns
the concrete size (without any traceable information)

◆ traceable()

const torch::Tensor * traceable ( ) const
noexcept
Returns
a pointer to the torch::Tensor representing the traceable size if it is traceable, otherwise a nullptr