Skip to content

User Documentation

Jordan Welsman edited this page Feb 13, 2023 · 4 revisions

Getting started

You can install nexport with pip using the following Terminal/Command Prompt command:

$ pip install nexport

Since nexport's submodule functions have been elevated, you can simply import it with the following line in your Python environment:

import nexport

Export functions

nexport.export()

This function is used to export a network object to a specified file format.

Usage

nexport.export(model=model,
               filetype="json"
               filename="model",
               indent=4,
               verbose=1,
               include_metadata=True,
               model_name="Example Model",
               model_author="Jordan Welsman",
               uses_skip_connections=False
)

Import functions

nexport.nimport()

This function is used to build a model object from a specified file.

Usage

model = nexport.nimport(filepath="model.json",
                        verbose=1
)

Calculator functions

calculate_layers()

This function is used to count the number of layers in a passed model object.

Usage

num_layers = nexport.calculate_layers(model=model,
                                      include_io=True
)

calculate_neurons()

This function is used to count the number of neurons in a passed model object.

Usage

num_neurons = nexport.calculate_neurons(model=model,
                                        include_io=True
)

calculate_params()

This function is used to calculate the number of trainable parameters in a passed model object.

Usage

num_params = nexport.calculate_params(model=model,
                                      param_types="wbt"
)