Shortcuts

Struct PairwiseDistanceOptions

Page Contents

Struct Documentation

struct torch::nn::PairwiseDistanceOptions

Options for the PairwiseDistance module.

Example:

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

Public Functions

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

The norm degree. Default: 2.

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

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

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

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

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