Loading a Model

Function Signature

def load(self, file_location: str) -> None:

Parameters

Return Value

This function does not return anything. It loads the model's state from the specified file location.

Description

The load function restores the deeprai.models.FeedForward instance from a saved state located at a file. This can be used to continue training from a checkpoint, or to deploy pre-trained models without the need to retrain them. The model's weights, architecture, and configurations are loaded from the specified file location. Before using this function, ensure the model architecture is the same as the one saved in the file.

Examples

Here's an example of how to use the load function:

from deeprai.models import FeedForward

model = FeedForward()

# Loading the model's state from a file
model.load('path/to/saved/model.deepr')

This code initializes a FeedForward model and then loads its state from the file located at 'path/to/saved/model.deepr'.


Revision #1
Created 6 September 2023 13:50:49 by Kieran Carter
Updated 6 September 2023 13:53:08 by Kieran Carter