Skip to main content

ClikaRT::nn::Flatten

class

Header: ClikaRT/nn/generated/flatten.h
Inherits: ClikaRT::nn::Module

Merges the inclusive dimension range [start_dim, end_dim] into one dimension; a view when the layout permits. The module form of ClikaRT::ops::flatten, which documents the full contract (shapes, dtypes, errors); construct once, then call it like a function.

Member functions​

Flatten(FlattenOptions)​

explicit Flatten(FlattenOptions options = {})

Constructs the module from options (every default when omitted).

Declared in ClikaRT/nn/generated/flatten.h, line 65

Flatten(int64_t, int64_t)​

explicit Flatten(std::int64_t start_dim, std::int64_t end_dim = -1)

Flatten(start_dim, end_dim): the positional form of FlattenOptions(start_dim, end_dim).

Declared in ClikaRT/nn/generated/flatten.h, line 68

forward()​

Tensor forward(Tensor input) const

forward_impl, unwrapped: raises ClikaRT::Error on failure.

Declared in ClikaRT/nn/generated/flatten.h, line 81

operator()()​

Tensor operator()(Tensor input) const

Same as forward.

Declared in ClikaRT/nn/generated/flatten.h, line 85

options()​

const FlattenOptions& options() const

The settings this module was constructed with.

Declared in ClikaRT/nn/generated/flatten.h, line 89