narchi - A neural network architecture definition package
narchi is as python package that provides functionalities for defining neural network architectures in an implementation independent way. It is intended to make network architectures highly configurable while also making the task easier.
Network architectures are written in jsonnet format, which provides useful features like input parameters and functions to define repeated blocks.
The shapes of the tensors internal to the networks are automatically deduced by propagating the shapes of the inputs, thus requiring less effort and being less error prone.
Propagation of shapes is done using symbolic arithmetic which makes it simple to understand relationships between inputs and the derived shapes.
Architecture files can reference other architecture files, thus making this approach modular.
A command line tool is included to validate jsonnet architecture files and to create detailed diagrams of the respective network architectures.
Several examples intended to illustrate different features supported.
Includes basic implementations that allows to instantiate pytorch modules:
Instantiation only requires a jsonnet architecture file.
No need to write module classes or forward function for each new architecture.
One basic implementation that supports instatiating several of the examples.
A second example that supports packed 1d and 2d sequences which illustrates the implementation independent nature of the architecture files.
- Json Schema
- Command line tool
- API Reference