PyTorch weights
stegobox.io.nnmodel.read(filepath)
Read a neural network model in format of collections.OrderedDict from a pth file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filepath |
str
|
The name or path of the pth file. |
required |
Returns:
Type | Description |
---|---|
OrderedDict
|
The neural networks model in format of collections.OrderedDict. |
Source code in stegobox/io/nnmodel.py
stegobox.io.nnmodel.write(model, filepath)
Save a neural network model in format of collections.OrderedDict to a pth file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
OrderedDict
|
The neural networks model in format of collections.OrderedDict. |
required |
filepath |
str
|
The name or path of the pth file. |
required |