std1.0.0-beta-7 SafeC docs

std :: ml::nn

Function std::tensors_save

#include <std/ml/nn.h> source · definition

int tensors_save(const &Vec<&FloatTensor> ts, const &char path)

A list of tensors' shapes and values to a file and back: the magic "SCTN", the count, then per tensor its rank, shape and float32 values (all little-endian, 64-bit counts). Loading fills existing tensors and requires the same count and shapes. Return 1 on success, 0 when the file can't be opened, is truncated or doesn't match.