Shortcuts

Struct PairwiseDistanceOptions

Page Contents

Struct Documentation

struct PairwiseDistanceOptions

Options for the PairwiseDistance module.

Example:

PairwiseDistance
model(PairwiseDistanceOptions().p(3).eps(0.5).keepdim(true));

Public Functions

inline auto p(const double &new_p) -> decltype(*this)

The norm degree. Default: 2.

inline auto p(double &&new_p) -> decltype(*this)
inline const double &p() const noexcept
inline double &p() noexcept
inline auto eps(const double &new_eps) -> decltype(*this)

Small value to avoid division by zero. Default: 1e-6.

inline auto eps(double &&new_eps) -> decltype(*this)
inline const double &eps() const noexcept
inline double &eps() noexcept
inline auto keepdim(const bool &new_keepdim) -> decltype(*this)

Determines whether or not to keep the vector dimension. Default: false.

inline auto keepdim(bool &&new_keepdim) -> decltype(*this)
inline const bool &keepdim() const noexcept
inline bool &keepdim() 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