Struct NormalizeFuncOptions#
Defined in File normalization.h
Page Contents
Struct Documentation#
-
struct NormalizeFuncOptions#
Options for
torch::nn::functional::normalize
.Example:
namespace F = torch::nn::functional; F::normalize(input, F::NormalizeFuncOptions().p(1).dim(-1));
Public Functions
-
inline auto p(const double &new_p) -> decltype(*this)#
The exponent value in the norm formulation. Default: 2.0.
-
inline auto p(double &&new_p) -> decltype(*this)#
-
inline const double &p() const noexcept#
-
inline double &p() noexcept#
-
inline auto dim(const int64_t &new_dim) -> decltype(*this)#
The dimension to reduce. Default: 1.
-
inline auto dim(int64_t &&new_dim) -> decltype(*this)#
-
inline const int64_t &dim() const noexcept#
-
inline int64_t &dim() noexcept#
-
inline auto eps(const double &new_eps) -> decltype(*this)#
Small value to avoid division by zero. Default: 1e-12.
-
inline auto eps(double &&new_eps) -> decltype(*this)#
-
inline const double &eps() const noexcept#
-
inline double &eps() noexcept#
-
inline auto out(const std::optional<Tensor> &new_out) -> decltype(*this)#
the output tensor.
If
out
is used, this operation won’t be differentiable.
-
inline auto out(std::optional<Tensor> &&new_out) -> decltype(*this)#
-
inline const std::optional<Tensor> &out() const noexcept#
-
inline std::optional<Tensor> &out() noexcept#
-
inline auto p(const double &new_p) -> decltype(*this)#