Sign in Sign up
nuget

DeepSharp.Import.PyTorch

Reads a network PyTorch trained into the same network written with DeepSharp: new SafetensorsFile(network, loss).Read(stream) for a safetensors file, new TorchSaveFile(network, loss).Read(stream) for the .pt or .pth file torch.save(model.state_dict(), file) writes. Every number goes into the slot its name names — in a network of steps, the step called as the module is called — a linear layer's weights turned round, a convolution's kernel, along one, two or three axes, laid out channels last, a recurrent layer's weights and multi-head attention's projections turned round with their gates and their blocks in PyTorch's order, the rows a flatten makes of series, images or volumes read place by place where PyTorch reads them channel by channel — and the network and its loss come back, to serve, to measure or to train further. A safetensors file is read by a port of safetensors' own reader, so a file it refuses is refused here in its words. The pickle torch.save writes is a program, so it is read by an interpreter that carries out only what PyTorch's own weights-only reader carries out and builds nothing a file names but what a state dictionary is made of: any other name is refused where the file names it, before anything is looked up, built or run. Every fault among the tensors is named at once by the tensor's name, and a network takes all of a file's numbers or none of them.

nuget View on Nuget

Activity

Latest release
3d ago
Total releases
14
Cadence
~2 days
Last 12 months
14

Details

License
MIT
First release
Oct 01, 2026
Releases
Version Released
0.17.0 minor
0.16.0 minor
0.15.0 minor
0.14.0 minor
0.13.0 minor
0.12.0 minor
0.11.0 minor
0.10.0 minor
0.9.0 minor
0.8.0 minor
0.7.1 patch
0.7.0 minor
0.6.1 minor
0.5.0 initial