Implement slope for Pseduo-Huber. (#7727)

* Add objective and metric.
* Some refactoring for CPU/GPU dispatching using linalg module.
This commit is contained in:
Jiaming Yuan
2022-03-14 21:42:38 +08:00
committed by GitHub
parent 4dafb5fac8
commit 98d6faefd6
28 changed files with 456 additions and 290 deletions

View File

@@ -314,11 +314,11 @@ TEST(Linalg, Popc) {
TEST(Linalg, Stack) {
Tensor<float, 3> l{{2, 3, 4}, kCpuId};
ElementWiseKernelHost(l.View(kCpuId), omp_get_max_threads(),
[=](size_t i, float v) { return i; });
ElementWiseTransformHost(l.View(kCpuId), omp_get_max_threads(),
[=](size_t i, float v) { return i; });
Tensor<float, 3> r_0{{2, 3, 4}, kCpuId};
ElementWiseKernelHost(r_0.View(kCpuId), omp_get_max_threads(),
[=](size_t i, float v) { return i; });
ElementWiseTransformHost(r_0.View(kCpuId), omp_get_max_threads(),
[=](size_t i, float v) { return i; });
Stack(&l, r_0);