How to obtain per-class accuracy at the end of each epoch?

def training_step(self, batch, batch_idx):
        ... # after computing accuracy per class
       for i, acc in enumerate(accs): # accs : accuracy per class
              self.log(f'train_acc_step_class_{i}', acc)

Not sure if it’s exactly what you want, I hope it can help.