model.py
def save_model(self, path, name, epoch="best"):
        """
        Method for saving the model.
        :param path: Directory path to save the model.
        :param name: The name of the experiment to be saved.
        :param epoch: Integer for the current epoch to be included in the save name.
        """

        # Checks if the save directory exists and if not creates it.
        os.makedirs(path, exist_ok=True)

        # Saves the model to the save directory.
        torch.save(self.state_dict(), os.path.join(path, f"{name}_sn_{str(epoch)}.pt"))

        Method for saving the model.
        :param path: Directory path to save the model.
        :param name: The name of the experiment to be saved.
        :param epoch: Integer for the current epoch to be included in the save name.
        
Method for saving the model.
Method for saving the model .
def save_model(self, path, name, epoch="best"):
        os.makedirs(path, exist_ok=True)
        torch.save(self.state_dict(), os.path.join(path, f"{name}_sn_{str(epoch)}.pt"))
def save_model ( self , path , name , epoch = "best" ) : os . makedirs ( path , exist_ok = True ) torch . save ( self . state_dict ( ) , os . path . join ( path , f"{name}_sn_{str(epoch)}.pt" ) )
Method for saving the model.
Method for saving the model .
"""
        Method for saving the model.
        :param path: Directory path to save the model.
        :param name: The name of the experiment to be saved.
        :param epoch: Integer for the current epoch to be included in the save name.
        """ # Checks if the save directory exists and if not creates it. # Saves the model to the save directory.
self
path
Directory path to save the model.
Directory path to save the model .
name
The name of the experiment to be saved.
The name of the experiment to be saved .
epoch
Integer for the current epoch to be included in the save name.
Integer for the current epoch to be included in the save name .