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
873528c1
"tests/git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "5083df15c6866a78704787ca942931feaa096a76"
Commit
873528c1
authored
Jan 22, 2017
by
Guolin Ke
Browse files
fix complie error in vs2013
parent
8da60f68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/boosting/gbdt.cpp
src/boosting/gbdt.cpp
+2
-2
No files found.
src/boosting/gbdt.cpp
View file @
873528c1
...
@@ -616,7 +616,7 @@ bool GBDT::LoadModelFromString(const std::string& model_str) {
...
@@ -616,7 +616,7 @@ bool GBDT::LoadModelFromString(const std::string& model_str) {
}
}
// returns offset, or lines.size() if not found.
// returns offset, or lines.size() if not found.
auto
find_string_lineno
=
[
&
lines
](
const
std
::
string
&
str
,
size_t
start_line
=
0
)
auto
find_string_lineno
=
[
&
lines
](
const
std
::
string
&
str
,
size_t
start_line
)
{
{
size_t
i
=
start_line
;
size_t
i
=
start_line
;
size_t
featinfo_find_pos
=
std
::
string
::
npos
;
size_t
featinfo_find_pos
=
std
::
string
::
npos
;
...
@@ -632,7 +632,7 @@ bool GBDT::LoadModelFromString(const std::string& model_str) {
...
@@ -632,7 +632,7 @@ bool GBDT::LoadModelFromString(const std::string& model_str) {
// load feature information
// load feature information
{
{
size_t
finfo_line_idx
=
find_string_lineno
(
"feature information:"
);
size_t
finfo_line_idx
=
find_string_lineno
(
"feature information:"
,
0
);
if
(
finfo_line_idx
>=
lines
.
size
())
{
if
(
finfo_line_idx
>=
lines
.
size
())
{
Log
::
Fatal
(
"Model file doesn't contain feature information"
);
Log
::
Fatal
(
"Model file doesn't contain feature information"
);
...
...
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