Evaluation code
@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.
@udion @sgk98 Hello?
@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
It is a function that computes the variance (or uncertainty) with the alpha, beta predictions from the network as mentioned in Eq. 9 in paper.
The aleatoric uncertainty can be computed by the formula of variance mentioned here: https://en.wikipedia.org/wiki/Generalized_normal_distribution
I think we forgot to update that function, both of us have graduated now, so can't update the code, but the above function should be straight forward to write.
the pip list is correct?