47#ifndef __NILOREA_PTH__
48#define __NILOREA_PTH__
63#define N_PTH_MAX_DIMS 8
int dims
how many dimensions
char * name
its path, the dictionary keys joined by dots; owned
N_PTH_TENSOR * tensors
the tensors, in the order the file lists them
int64_t shape[8]
their sizes
float * data
its values, contiguous, row major; owned
void n_pth_free(N_PTH **pth)
release a checkpoint's tensors
const N_PTH_TENSOR * n_pth_find(const N_PTH *pth, const char *name)
find a tensor by its path
N_PTH * n_pth_load(const char *path)
read every tensor of a checkpoint
#define N_PTH_MAX_DIMS
Most dimensions a tensor read may have.
One tensor of a checkpoint.