-
Notifications
You must be signed in to change notification settings - Fork 3
User Documentation
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
This function is used to export a network object to a specified file format.
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
)
This function is used to build a model object from a specified file.
model = nexport.nimport(filepath="model.json",
verbose=1
)
This function is used to count the number of layers in a passed model object.
num_layers = nexport.calculate_layers(model=model,
include_io=True
)
This function is used to count the number of neurons in a passed model object.
num_neurons = nexport.calculate_neurons(model=model,
include_io=True
)
This function is used to calculate the number of trainable parameters in a passed model object.
num_params = nexport.calculate_params(model=model,
param_types="wbt"
)
Created and maintained by Jordan Welsman @ LBNL.
nexport
Copyright (c) 2022-2023, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy).
All rights reserved.