Initial support for quantile loss. (#8750)

- Add support for Python.
- Add objective.
This commit is contained in:
Jiaming Yuan
2023-02-16 02:30:18 +08:00
committed by GitHub
parent 282b1729da
commit cce4af4acf
26 changed files with 701 additions and 70 deletions

View File

@@ -16,6 +16,7 @@
#include <algorithm>
#include <cassert>
#include <cinttypes> // std::int32_t
#include <cstddef> // std::size_t
#include <limits>
#include <string>
#include <tuple>
@@ -552,6 +553,11 @@ LINALG_HD auto UnravelIndex(size_t idx, common::Span<size_t const, D> shape) {
}
}
template <size_t D>
LINALG_HD auto UnravelIndex(size_t idx, std::size_t const (&shape)[D]) {
return UnravelIndex(idx, common::Span<std::size_t const, D>(shape));
}
/**
* \brief A view over a vector, specialization of Tensor
*