def train_target_epoch(epoch, model, data_loader, loss_func, device, trial, silent=True):
    """
    Target target network for single epoch.

    Args:
        epoch (int): current epoch
        model (LDL): LDL model object
        data_loader (itertable): data loader
        loss_func (func): pytorch loss function
        device (torch.Device): device on which to train
        trial (int): number of trial
        silent (bool): if True print nothing.

    Returns: None

    """
    results_data = []
    n = len(data_loader)
    for batch_i, (x, y) in enumerate(data_loader):
        x = x.view(1, x.shape[0]).to(device)
        y = y.to(device)

        # Activate predictor corresponding to the true label
        model.activate_predictor(class_=y.item())

        predictor_z, target_z = model(x)
        loss = loss_func(target_z, predictor_z).mean()

        # Update target weights
        optimizer = model.optimizer_target
        optimizer.zero_grad()
        loss.backward()
        optimizer.step()

        if not silent and batch_i % 1000 == 0:
            msg = 'Train Epoch: {} [{}/{} ({:.0f}%)]\tLoss: {:.6f}'
            print(msg.format(epoch+1, batch_i, n, batch_i/n*100, loss.item()))

        # Logging info
        results_data.append(
            [trial, "train", epoch, batch_i, 'Teacher', loss.item()])

    return results_data