Reduce base margin to 2 dim for now. (#7455)

This commit is contained in:
Jiaming Yuan
2021-11-27 00:46:13 +08:00
committed by GitHub
parent bf7bb575b4
commit 557ffc4bf5
7 changed files with 33 additions and 33 deletions

View File

@@ -254,7 +254,7 @@ TEST(SimpleDMatrix, Slice) {
std::iota(upper.begin(), upper.end(), 1.0f);
auto& margin = p_m->Info().base_margin_;
margin = linalg::Tensor<float, 3>{{kRows, kClasses}, GenericParameter::kCpuId};
margin = decltype(p_m->Info().base_margin_){{kRows, kClasses}, GenericParameter::kCpuId};
std::array<int32_t, 3> ridxs {1, 3, 5};
std::unique_ptr<DMatrix> out { p_m->Slice(ridxs) };