Code not printing values in trained_epoch_end
My code is not printing print('train acc loss',acc,loss) in trained_epoch_end but its printing print('val acc loss',acc,loss) in validation_epoch_end
class Model(LightningModule):
  def __init__(self):
    super(Model,self).__init__()
    self.model=ResneT(21)
    self.lr=1e-3
    self.bs=128
    self.worker=6
    self.acc=torchmetrics.Accuracy()
    self.creterion=nn.BCEWithLogitsLoss()
    self.scheduler='lambda'
  def forward(self,x):
    x=self.model(x)
    return x

  def configure_optimizers(self):
    opt=torch.optim.AdamW(params=self.parameters(),lr=self.lr )
    return opt

  def train_dataloader(self):
    dataset=DataReader(train_df)
    dataloader=DataLoader(dataset,batch_size=self.bs,num_workers=self.worker,shuffle=True,
                         pin_memory=True,collate_fn=collate_fn)
    return dataloader

  def training_step(self,batch,batch_idx):
    signal,label=batch
    out=self(signal.float())
    loss=self.creterion(out.flatten(),label.float().flatten())
    acc=self.acc(out.flatten(),label.long().flatten())
    return {'loss':loss,'acc':acc}

  def trained_epoch_end(self,outputs):
    acc=torch.stack([x['acc'] for x in outputs]).mean().detach().cpu().numpy().round(2)
    loss=torch.stack([x['loss'] for x in outputs]).mean().detach().cpu().numpy().round(2)
    self.log('train acc',acc)
    self.log('train loss',loss)
    print('train acc loss',acc,loss)

  def val_dataloader(self):
    dataset=DataReader(val_df)
    dataloader=DataLoader(dataset,batch_size=self.bs,num_workers=self.worker,shuffle=False,
                          pin_memory=True,
                         collate_fn=collate_fn)
    return dataloader

  def validation_step(self,batch,batch_idx):
    signal,label=batch
    out=self(signal.float())
    loss=self.creterion(out.flatten(),label.float().flatten())
    acc=self.acc(out.flatten(),label.long().flatten())
    return {'loss':loss,'acc':acc}

  def validation_epoch_end(self,outputs):
    acc=torch.stack([x['acc'] for x in outputs]).mean().detach().cpu().numpy().round(2)
    loss=torch.stack([x['loss'] for x in outputs]).mean().detach().cpu().numpy().round(2)
    print('val acc loss',self.current_epoch,acc,loss)
    self.log('val acc',acc)
    self.log('val loss',loss)
You need to implement training_epoch_end, not trained_epoch_end: 
  
    
      pytorch-lightning/pytorch_lightning/core/lightning.py
    
    
         Line 689
      in
      1515ef9
    
  
  
    

        
          
           def training_epoch_end(self, outputs: EPOCH_OUTPUT) -> None: