Skip to content

Commit 54506bd

Browse files
authored
minor
1 parent 7d59c7a commit 54506bd

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

examples/yolo/yolo-image.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ bool load_image(const char *fname, yolo_image & img)
8888
return true;
8989
}
9090

91-
bool load_image_from_memory(const char *buffer, int len, yolo_image & img)
91+
bool load_image_from_memory(const char * buffer, int len, yolo_image & img)
9292
{
9393
int w, h, c;
9494
uint8_t * data = stbi_load_from_memory((uint8_t *)buffer, len, &w, &h, &c, 3);
@@ -232,4 +232,4 @@ void draw_label(yolo_image & im, int row, int col, const yolo_image & label, con
232232
}
233233
}
234234
}
235-
}
235+
}

examples/yolo/yolo-image.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct yolo_image {
3232
};
3333

3434
bool load_image(const char *fname, yolo_image & img);
35-
bool load_image_from_memory(const char *buffer, int len, yolo_image & img);
35+
bool load_image_from_memory(const char * buffer, int len, yolo_image & img);
3636
void draw_box_width(yolo_image & a, int x1, int y1, int x2, int y2, int w, float r, float g, float b);
3737
yolo_image letterbox_image(const yolo_image & im, int w, int h);
3838
bool save_image(const yolo_image & im, const char *name, int quality);

examples/yolo/yolov3-tiny.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ struct membuf : std::streambuf {
125125
virtual pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which = std::ios_base::in) override {
126126
if(dir == std::ios_base::cur) {
127127
gbump(off);
128-
} else if(dir == std::ios_base::end) {
128+
} else if (dir == std::ios_base::end) {
129129
setg(begin, end + off, end);
130-
} else if(dir == std::ios_base::beg) {
130+
} else if (dir == std::ios_base::beg) {
131131
setg(begin, begin + off, end);
132132
}
133133

src/ggml.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21562,13 +21562,6 @@ struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_p
2156221562
ok = ok && gguf_fread_el (file, &info->type, sizeof(info->type), &offset);
2156321563
ok = ok && gguf_fread_el (file, &info->offset, sizeof(info->offset), &offset);
2156421564

21565-
// set tensor size
21566-
size_t size = 1;
21567-
for (uint32_t j = 0; j < info->n_dims; ++j) {
21568-
size *= info->ne[j];
21569-
}
21570-
info->size = size;
21571-
2157221565
// TODO: return an error instead of crashing with GGML_ASSERT
2157321566
gguf_tensor_info_sanitize(info);
2157421567

0 commit comments

Comments
 (0)