Program Listing for File distance.h¶
↰ Return to documentation for file (torch/csrc/api/include/torch/nn/options/distance.h
)
#pragma once
#include <torch/arg.h>
#include <torch/csrc/Export.h>
#include <torch/types.h>
namespace torch {
namespace nn {
struct TORCH_API CosineSimilarityOptions {
TORCH_ARG(int64_t, dim) = 1;
TORCH_ARG(double, eps) = 1e-8;
};
namespace functional {
using CosineSimilarityFuncOptions = CosineSimilarityOptions;
} // namespace functional
// ============================================================================
struct TORCH_API PairwiseDistanceOptions {
TORCH_ARG(double, p) = 2.0;
TORCH_ARG(double, eps) = 1e-6;
TORCH_ARG(bool, keepdim) = false;
};
namespace functional {
using PairwiseDistanceFuncOptions = PairwiseDistanceOptions;
} // namespace functional
} // namespace nn
} // namespace torch