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
a6d1bbda
"src/git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "2422a400e80de51620ca210f3fc23248d06145b0"
Commit
a6d1bbda
authored
Oct 11, 2016
by
Guolin Ke
Browse files
warnings fixed.
parent
9f98ac7f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/io/metadata.cpp
src/io/metadata.cpp
+2
-2
No files found.
src/io/metadata.cpp
View file @
a6d1bbda
...
@@ -186,7 +186,7 @@ void Metadata::LoadWeights() {
...
@@ -186,7 +186,7 @@ void Metadata::LoadWeights() {
num_weights_
=
static_cast
<
data_size_t
>
(
reader
.
Lines
().
size
());
num_weights_
=
static_cast
<
data_size_t
>
(
reader
.
Lines
().
size
());
weights_
=
new
float
[
num_weights_
];
weights_
=
new
float
[
num_weights_
];
for
(
data_size_t
i
=
0
;
i
<
num_weights_
;
++
i
)
{
for
(
data_size_t
i
=
0
;
i
<
num_weights_
;
++
i
)
{
double
tmp_weight
;
double
tmp_weight
=
0.0
f
;
Common
::
Atof
(
reader
.
Lines
()[
i
].
c_str
(),
&
tmp_weight
);
Common
::
Atof
(
reader
.
Lines
()[
i
].
c_str
(),
&
tmp_weight
);
weights_
[
i
]
=
static_cast
<
float
>
(
tmp_weight
);
weights_
[
i
]
=
static_cast
<
float
>
(
tmp_weight
);
}
}
...
@@ -201,7 +201,7 @@ void Metadata::LoadInitialScore() {
...
@@ -201,7 +201,7 @@ void Metadata::LoadInitialScore() {
Log
::
Stdout
(
"Start to load initial score"
);
Log
::
Stdout
(
"Start to load initial score"
);
num_init_score_
=
static_cast
<
data_size_t
>
(
reader
.
Lines
().
size
());
num_init_score_
=
static_cast
<
data_size_t
>
(
reader
.
Lines
().
size
());
init_score_
=
new
score_t
[
num_init_score_
];
init_score_
=
new
score_t
[
num_init_score_
];
double
tmp
;
double
tmp
=
0.0
f
;
for
(
data_size_t
i
=
0
;
i
<
num_init_score_
;
++
i
)
{
for
(
data_size_t
i
=
0
;
i
<
num_init_score_
;
++
i
)
{
Common
::
Atof
(
reader
.
Lines
()[
i
].
c_str
(),
&
tmp
);
Common
::
Atof
(
reader
.
Lines
()[
i
].
c_str
(),
&
tmp
);
init_score_
[
i
]
=
static_cast
<
score_t
>
(
tmp
);
init_score_
[
i
]
=
static_cast
<
score_t
>
(
tmp
);
...
...
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