def KG(self, epoch: int) -> np.ndarray:
    KG_list = list()
    for (i, (index, metric)) in enumerate(self.history[epoch]):
        if isinstance(metric, ConvLayerMetrics):
            KG_list.append(((metric.input_channel.KG + metric.output_channel.KG) / 2))
        elif isinstance(metric, LayerMetrics):
            KG_list.append(metric.KG)
    return np.array(KG_list)
def KG(self, epoch: int) -> np.ndarray:
    KG_list = list()
    for (i, (index, metric)) in enumerate(self.history[epoch]):
        if isinstance(metric, ConvLayerMetrics):
            KG_list.append(((metric.input_channel.KG + metric.output_channel.KG) / 2))
        elif isinstance(metric, LayerMetrics):
            KG_list.append(metric.KG)
    return np.array(KG_list)