Skip to content

Weights

Randall O'Reilly edited this page Aug 25, 2019 · 3 revisions

This page has all information on Weights: Saving, Loading, etc

There are two major standards for backprop-style neural networks, NNEF and ONNX: https://www.khronos.org/blog/nnef-and-onnx-similarities-and-differences. The NNEF is probably the more relevant given its more official, broader status, and its data format is defined here: https://www.khronos.org/registry/NNEF/specs/1.0/nnef-1.0.html#storing-data It is a binary format with multiple files within a directory structure, typically packed into a tar file. This is great for maximum flexibility but not that practical for "everyday use" in our models -- don't want to deal with tar etc. Having a binary format is a good idea, but for smaller networks, being able to edit the values etc in text is important.

We weren't able to find a weight file standard for the more biologically-oriented frameworks, NeuroML and PyNN -- see Standards

Thus, we will initially support a JSON-based text format, and then add support for binary NNEF later.

JSON Text format

Note: this format changed as of 8/25/2019 -- prior weight files are not valid.

Basically, it is a straightforward format with Network then nested []Layer with nested []Neuron etc.

NNEF Binary format

TODO

test

Clone this wiki locally