lstm.py
def save_metrics_all(self, metrics_dict: dict):
        """ Save metrics to CSV file with the corresponding metrics history.
        """
        path = self.metrics_dir + "/" + self.name

        with open(path + "/" + self.name + "_metrics.csv", "a+") as output_file:
            list_loss = metrics_dict["loss"]
            list_accuracy = metrics_dict["accuracy"]
            for epoch in range(1,len(list_loss)+1):
                metrics_string = str(epoch) + "," + str(list_loss[epoch-1]) + "," + str(list_accuracy[epoch-1]) + "\n"
                output_file.write(metrics_string)

        return
 Save metrics to CSV file with the corresponding metrics history.
        
Save metrics to CSV file with the corresponding metrics history.
Save metrics to CSV file with the corresponding metrics history .
def save_metrics_all(self, metrics_dict: dict):
        path = self.metrics_dir + "/" + self.name
        with open(path + "/" + self.name + "_metrics.csv", "a+") as output_file:
            list_loss = metrics_dict["loss"]
            list_accuracy = metrics_dict["accuracy"]
            for epoch in range(1,len(list_loss)+1):
                metrics_string = str(epoch) + "," + str(list_loss[epoch-1]) + "," + str(list_accuracy[epoch-1]) + "\n"
                output_file.write(metrics_string)
        return
def save_metrics_all ( self , metrics_dict : dict ) : path = self . metrics_dir + "/" + self . name with open ( path + "/" + self . name + "_metrics.csv" , "a+" ) as output_file : list_loss = metrics_dict [ "loss" ] list_accuracy = metrics_dict [ "accuracy" ] for epoch in range ( 1 , len ( list_loss ) + 1 ) : metrics_string = str ( epoch ) + "," + str ( list_loss [ epoch - 1 ] ) + "," + str ( list_accuracy [ epoch - 1 ] ) + "\n" output_file . write ( metrics_string ) return
Save metrics to CSV file with the corresponding metrics history.
Save metrics to CSV file with the corresponding metrics history .
""" Save metrics to CSV file with the corresponding metrics history.
        """
self
metrics_dict
dict