Skip to content

Commit

Permalink
update cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
aksnzhy committed Oct 29, 2018
1 parent 1d22d36 commit 27243b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ add_subdirectory(scripts)
add_subdirectory(src/base)
add_subdirectory(src/data)
add_subdirectory(src/reader)
#add_subdirectory(src/score)
#add_subdirectory(src/loss)
#add_subdirectory(src/solver)
#add_subdirectory(src/distributed)
#add_subdirectory(src/c_api)
#add_subdirectory(python-package)
##add_subdirectory(R-package)
add_subdirectory(src/score)
add_subdirectory(src/loss)
add_subdirectory(src/solver)
add_subdirectory(src/distributed)
add_subdirectory(src/c_api)
add_subdirectory(python-package)
#add_subdirectory(R-package)
2 changes: 1 addition & 1 deletion src/loss/loss.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void Loss::CalcGradDist(DMatrix* matrix,
for(;;) {
// Get a mini-batch from current data matrix
DMatrix mini_batch;
mini_batch.ResetMatrix(batch_size_);
mini_batch.ReAlloc(batch_size_);
index_t len = matrix->GetMiniBatch(batch_size_, mini_batch);
if (len == 0) {
break;
Expand Down
6 changes: 3 additions & 3 deletions src/loss/loss_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ TEST_F(LossTest, Predict_Linear) {
}
// Create Data matrix
DMatrix matrix;
matrix.ResetMatrix(kLine);
matrix.ReAlloc(kLine);
for (int i = 0; i < kLine; ++i) {
matrix.Y[i] = 0;
matrix.row[i] = new SparseRow;
Expand Down Expand Up @@ -131,7 +131,7 @@ TEST_F(LossTest, Predict_FM) {
}
// Create Data matrix
DMatrix matrix;
matrix.ResetMatrix(kLine);
matrix.ReAlloc(kLine);
for (int i = 0; i < kLine; ++i) {
matrix.Y[i] = 0;
matrix.row[i] = new SparseRow;
Expand Down Expand Up @@ -176,7 +176,7 @@ TEST_F(LossTest, Predict_FFM) {
}
// Create Data matrix
DMatrix matrix;
matrix.ResetMatrix(kLine);
matrix.ReAlloc(kLine);
for (int i = 0; i < kLine; ++i) {
matrix.Y[i] = 0;
matrix.row[i] = new SparseRow;
Expand Down

0 comments on commit 27243b0

Please sign in to comment.