Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
79c7c09d
Commit
79c7c09d
authored
Apr 22, 2017
by
Guolin Ke
Browse files
use assert to avoid unknow exception.
parent
e0ec8661
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/boosting/gbdt.cpp
src/boosting/gbdt.cpp
+3
-1
No files found.
src/boosting/gbdt.cpp
View file @
79c7c09d
...
...
@@ -172,7 +172,9 @@ void GBDT::ResetTrainingData(const BoostingConfig* config, const Dataset* train_
// multi-class
std
::
vector
<
data_size_t
>
cnt_per_class
(
num_tree_per_iteration_
,
0
);
for
(
data_size_t
i
=
0
;
i
<
num_data_
;
++
i
)
{
++
cnt_per_class
[
static_cast
<
int
>
(
label
[
i
])];
int
index
=
static_cast
<
int
>
(
label
[
i
]);
CHECK
(
index
<
num_tree_per_iteration_
);
++
cnt_per_class
[
index
];
}
for
(
int
i
=
0
;
i
<
num_tree_per_iteration_
;
++
i
)
{
if
(
cnt_per_class
[
i
]
==
num_data_
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment