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

Evaluation code #4

Open
asdffasdfaf opened this issue Dec 21, 2023 · 2 comments
Open

Evaluation code #4

asdffasdfaf opened this issue Dec 21, 2023 · 2 comments

Comments

@asdffasdfaf
Copy link

@udion @sgk98 Thank you. Could you provide the evaluation code, please?

Is the following code for calculating uncertainty correct?

def mean(tensor):
    log_tensor = torch.log(tensor)
    mean_log = torch.mean(log_tensor)
    geometric_mean = torch.exp(mean_log)
    return geometric_mean.item()

imdict=get_features_uncer_ProbVLM(CLIP_Net,ProbVLM_Net,cub_test_loader)
uncertainty=imdict['i_u']
uncertainty=[mean(i) for i in uncertainty]

The mean() function calculates the geometric mean.

@asdffasdfaf
Copy link
Author

asdffasdfaf commented Jan 9, 2024

@udion @sgk98 Hello?

@Pefect96
Copy link

@asdffasdfaf Have you solved the problem? In the function of get_features_uncer_ProbVLM, I do not find the specific definition for the function multi_fwpass_BayesCap

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