def train(self):
        '''
        Solve gamma for only one epoch.
        '''
        fw_time = time()
        torch.cuda.synchronize()
        
        all_losses, all_dev_losses = self.forward()
        interval = 10
        sub_all_losses = [round(all_losses[i], 4) for i in range(0, len(all_losses), interval)]
        sub_all_dev_losses = [round(all_dev_losses[i], 4) for i in range(0, len(all_dev_losses), interval)]
        self.print_and_save(f"Train Losses (inter {interval}): {sub_all_losses}")
        self.print_and_save(f"Dev Losses (inter {interval}): {sub_all_dev_losses}")

        torch.cuda.synchronize()
        fw_time = time() - fw_time
        bw_time = time()
        
        self.backward()
        
        torch.cuda.synchronize()
        bw_time = time() - bw_time
        
        self.print_and_save("Forward Time: {:.4f}, Backward Time: {:.4f}".format(fw_time, bw_time))

        Solve gamma for only one epoch.
        
data_selection/pmp_solver/trainer.py