I’m not sure about posting a model, but evaluate function is:
def evaluate(epoch):
        nonlocal global_step
        model.eval()
        num_correct = total_loss = 0
        for batch_step, (X_valid, y_valid) in enumerate(valid_set):
            X_valid, y_valid = torch.tensor(X_valid, requires_grad=False).to(DEVICE), torch.tensor(y_valid, requires_grad=False).to(DEVICE)
            logit, _ = model(X=X_valid)
            y_pred = logit.data.max(1)[1]
            loss = criterion(input=logit, target=y_valid).to(DEVICE)
            total_loss += loss.item()
            num_correct += y_pred.eq(y_valid).long().sum().item()
        loss = total_loss / len(valid_set)
        accuracy = num_correct / len(valid_set.dataset) * 100
        WRITER.add_scalar(tag='Valid Loss', scalar_value=loss,
                                  global_step=epoch)
        WRITER.add_scalar(tag='Valid Accuracy', scalar_value=accuracy,
                                  global_step=epoch)
        learning_rate_scheduler.step(accuracy)

        print('\nValidation : Loss: {:.6f} Accuracy: {}/{} ({:.4f}%)\n'.format(loss, num_correct, len(valid_set.dataset), accuracy))

        return loss, accuracy