def validation_module(net, A, X, y, training_instances, validation_instances, test_instances, time, epoch, subepoch, **kwargs):
    dict_validation = {}
    losses_test = get_loss(net, A, X, y, test_instances)
    dict_validation['test_prediction_loss'] = losses_test[0]
    dict_validation['test_task_loss'] = losses_test[1]
    losses_train = get_loss(net, A, X, y, training_instances)
    dict_validation['train_prediction_loss'] = losses_train[0]
    dict_validation['train_task_loss'] = losses_train[1]
    losses_validation = get_loss(net, A, X, y, validation_instances)
    dict_validation['validation_prediction_loss'] = losses_validation[0]
    dict_validation['validation_task_loss'] = losses_validation[1]
    dict_validation['batch'] = subepoch
    dict_validation['epoch'] = epoch
    dict_validation['time'] = time
    return dict_validation
def validation_module(net, A, X, y, training_instances, validation_instances, test_instances, time, epoch, subepoch, **kwargs):
    dict_validation = {}
    losses_test = get_loss(net, A, X, y, test_instances)
    dict_validation['test_prediction_loss'] = losses_test[0]
    dict_validation['test_task_loss'] = losses_test[1]
    losses_train = get_loss(net, A, X, y, training_instances)
    dict_validation['train_prediction_loss'] = losses_train[0]
    dict_validation['train_task_loss'] = losses_train[1]
    losses_validation = get_loss(net, A, X, y, validation_instances)
    dict_validation['validation_prediction_loss'] = losses_validation[0]
    dict_validation['validation_task_loss'] = losses_validation[1]
    dict_validation['batch'] = subepoch
    dict_validation['epoch'] = epoch
    dict_validation['time'] = time
    return dict_validation