Skip to content

Commit 5125fb9

Browse files
jw098Gin890
authored andcommitted
fix build
1 parent 6b1a7e0 commit 5125fb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SerialPrograms/Source/ML/DataLabeling/ML_SegmentAnythingModel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ void compute_embeddings_for_folder(const std::string& embedding_model_path, cons
239239
output_image_embedding.clear();
240240

241241
// fall back to CPU if fails with GPU.
242-
for(size_t i = 0; i < 2; i++){
242+
for(size_t j = 0; j < 2; j++){
243243
try{
244244
// If fails with GPU, fall back to CPU.
245245
embedding_session->run(resized_mat, output_image_embedding);
@@ -265,12 +265,12 @@ void compute_embeddings_for_folder(const std::string& embedding_model_path, cons
265265

266266
}
267267

268-
if (i > 0){
268+
if (j > 0){
269269
std::cerr << "Internal Program Error: This section of code shouldn't be reachable." << std::endl;
270270
QMessageBox box;
271271
box.warning(nullptr, "Error:",
272272
QString::fromStdString("Internal Program Error: This section of code shouldn't be reachable."));
273-
return false;
273+
return;
274274
}
275275
}
276276
save_image_embedding_to_disk(image_path, output_image_embedding);

0 commit comments

Comments
 (0)