]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
clip : fix wrong loop condition
authorGeorgi Gerganov <redacted>
Thu, 15 Feb 2024 16:49:08 +0000 (18:49 +0200)
committerGeorgi Gerganov <redacted>
Thu, 15 Feb 2024 16:49:08 +0000 (18:49 +0200)
examples/llava/clip.cpp

index 2cad27e828c704eb2922cfa45ba9ee155eca2056..98d512f67a0e2ce00ac80c3f69a3e4ae4709fe48 100644 (file)
@@ -1103,7 +1103,7 @@ struct clip_ctx * clip_model_load(const char * fname, const int verbosity = 1) {
             printf("v_image_mean       %f %f %f\n", new_clip->image_mean[0], new_clip->image_mean[1], new_clip->image_mean[2]);
             printf("v_image_std        %f %f %f\n", new_clip->image_std[0], new_clip->image_std[1], new_clip->image_std[2]);
             printf("v_image_grid_pinpoints: ");
-            for (int i = 0; i < 32 & hparams.image_grid_pinpoints[i]!=0; ++i) {
+            for (int i = 0; i < 32 && (hparams.image_grid_pinpoints[i] != 0); ++i) {
                 printf("%d ", hparams.image_grid_pinpoints[i]);
             }
             printf("\n");