mirror of
https://github.com/antirez/gguf-tools.git
synced 2025-12-16 00:18:52 +08:00
Print tensor with correct strides
This commit is contained in:
@@ -368,7 +368,7 @@ void gguf_tools_inspect_weights(const char *filename, const char *tname, uint64_
|
|||||||
uint64_t strides[GGUF_TENSOR_MAX_DIM] = {0};
|
uint64_t strides[GGUF_TENSOR_MAX_DIM] = {0};
|
||||||
strides[tensor.ndim-1] = 1;
|
strides[tensor.ndim-1] = 1;
|
||||||
for (int j = tensor.ndim - 2; j >= 0; j--) {
|
for (int j = tensor.ndim - 2; j >= 0; j--) {
|
||||||
strides[j] = tensor.dim[j + 1] * strides[j + 1];
|
strides[j] = tensor.dim[tensor.ndim - 2 - j] * strides[j + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
const int ident = 4;
|
const int ident = 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user