@ptrblck , can you please help me where to put your above suggested code , as you mentioned in training loop then i guess it could be like
def train_loop(model, epochs, lr=0.01, wd=0.0):
    optim = get_optimizer(model, lr = lr, wd = wd)
    for epoch in range(epochs): 
        
        target = torch.tensor([69, 68])<---------------
        assert (target<70).all(), "target: {} invalid".format(target)<-------------
        
        loss,pred = train_model(model, optim, train_dl)
        if (epoch+1) % 5 ==0:
            print(f'epoch : {epoch+1},training loss : {loss}, output : {output}')