Shortcuts

Struct FlattenOptions

Page Contents

Struct Documentation

struct FlattenOptions

Options for the Flatten module.

Example:

Flatten model(FlattenOptions().start_dim(2).end_dim(4));

Public Functions

inline auto start_dim(const int64_t &new_start_dim) -> decltype(*this)

first dim to flatten

inline auto start_dim(int64_t &&new_start_dim) -> decltype(*this)
inline const int64_t &start_dim() const noexcept
inline int64_t &start_dim() noexcept
inline auto end_dim(const int64_t &new_end_dim) -> decltype(*this)

last dim to flatten

inline auto end_dim(int64_t &&new_end_dim) -> decltype(*this)
inline const int64_t &end_dim() const noexcept
inline int64_t &end_dim() noexcept

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources