5 Struct N_PTH_TENSOR
gullradriel edited this page 2026-10-09 00:55:18 +02:00

N_PTH_TENSOR

Module: PTH: reading the tensors of a PyTorch checkpoint

One tensor of a checkpoint.

#include "n_pth.h"

Public Attributes

Name
int64_t[8] shape
their sizes
char * name
its path, the dictionary keys joined by dots; owned
int dims
how many dimensions
float * data
its values, contiguous, row major; owned
size_t count
how many

Public Attributes Documentation

variable shape

int64_t[8] shape;

their sizes

variable name

char * name;

its path, the dictionary keys joined by dots; owned

variable dims

int dims;

how many dimensions

variable data

float * data;

its values, contiguous, row major; owned

variable count

size_t count;

how many