Thanks alot
I went with the following. looping over features on the outside of the function in order to log evry feature’s performance
def accuracy_test(model, loader, feature): 

    batch_size = loader.batch_size
    mu = 0
    sigma = 0.01
    
    train_on_gpu = (True if torch.cuda.is_available() else False)
    print("Training on gpu :{}".format(train_on_gpu))
    
    if(train_on_gpu):
        model.cuda()
        
    model.eval()
    losses = []

    criterion = nn.CrossEntropyLoss()
    h = model.init_hidden(batch_size)
    
    with torch.no_grad():
        for inp, labels in loader:
            perbutated_inp = copy.deepcopy(inp)
            perbutated_inp[ : , : , feature] = torch.HalfTensor(np.random.normal(mu, sigma, inp.shape[1]))
            
            inp = perbutated_inp
            
            if(train_on_gpu):
                inp, labels = inp.cuda(), labels.cuda()
            
            inp = inp.reshape(inp.shape[1], inp.shape[0], inp.shape[2])
        
            outputs, h = model(inp.float(), h)       
            loss = criterion(outputs, labels.long())
            losses.append(loss.item())
                      
            
    test_loss = np.mean(losses)
    
    return test_loss