hookeai.model_architectures.procedures.model_state_files.check_state_file¶
- check_state_file(model, filename)[source]¶
Check if file is model training epoch state file.
Model training epoch state file is stored in model_directory under the name < model_name >-< epoch >.pt.
- Parameters:
model (torch.nn.Module) – Model.
filename (str) – File name.
- Returns:
is_state_file (bool) – True if model training epoch state file, False otherwise.
epoch ({None, int}) – Training epoch corresponding to model state file if is_state_file=True, None otherwise.