Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

predict_trials() returns ground truth labels from Dataset as trial_labels? #566

Open
yanlingpan opened this issue Jan 19, 2024 · 2 comments

Comments

@yanlingpan
Copy link

I thought trial_labels returned are computed from trial_predictions, which should be the same as what returned by calling predict(). But it returns the ground truth labels from the dataset. Is this is intentional?

code from .training.scoring.predict_trials

loader = DataLoader(
    dataset=dataset,
    batch_size=batch_size,
    shuffle=False,
    num_workers=num_workers,
)
device = next(module.parameters()).device
all_preds, all_ys, all_inds = [], [], []
with torch.no_grad():
    for X, y, ind in loader:
        X = X.to(device)
        preds = module(X)
        all_preds.extend(preds.cpu().numpy().astype(np.float32))
        all_ys.extend(y.cpu().numpy().astype(np.float32))
        all_inds.extend(ind)
@bruAristimunha
Copy link
Collaborator

Hello @yanlingpan,

I am not fully familiar with this function, but I am pinging who implemented them.

@bruAristimunha
Copy link
Collaborator

Hey @gemeinl and @dengemann!

Can you please help me with this small issue/question about the function predict_trials? 🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants