-
Notifications
You must be signed in to change notification settings - Fork 3
Model Import
This function allows users to import a model saved with nexport.export()
by simply pointing to a file. It returns a fully rebuilt model object at assignment.
import nexport
model = nexport.nimport(filepath="model.json",
verbose=1
)
Argument | Data type | Default | Description |
---|---|---|---|
filepath |
string | Path to file containing the exported model's parameters | |
verbose |
integer | 1 |
Degree of status output for model construction |
This is the path to a file previously generated by nexport.export()
. If the file has been generated with anything other than nexport (such as pickle), this function will likely not be able to construct the contained model.
This is the degree of verbosity the function should output to when reporting the export status. There are currently four levels of verbosity:
-
0
: Status reporting disabled. No output to console when constructing -
1
: Status reported when model has been successfully constructed and returned. -
2
: Status reported when INSERT REQUIREMENTS HERE, in addition to all updates in1
. -
3
: Status reported INSERT REQUIREMENTS HERE, in addition to all updates in2
.
Argument | Required | Accepted values |
---|---|---|
filepath |
✅ | Any string pointing to a file with a supported filetype |
verbose |
❌ |
0 , 1 , 2 , 3
|
This function returns a fully-constructed dense neural network, and as such, should be called under assignment to an object, like in this example.
Despite having the sole purpose of returning an object, this function outputs status updates to the terminal depending on the degree of verbosity passed.
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.