_sample_from_history output size #120
Replies: 2 comments 3 replies
-
I will rephrase my question. If I understand it right, the function
If we consider the following example:
We have 2 classes and 3 MC samples. Let's take
where the ith row of Then,
We can see that the rows of probs[:,:,:,i] are defined by the index of the ith column of I hope my question is clear. |
Beta Was this translation helpful? Give feedback.
-
Hello! Thanks for the question. Let batch N = 2, MC-Iteration K=20 and num_sample S = 100. choices = self.draw_choices(...) # Has shape [B, K, S]
probs = gather_expand(...) # Has shape [N,K,K,S]
entropies = ... # Has shape [K*S, K] If I understand your question properly, we are not indexing by the MC samples (K), but by the draw (S). Yes there is a typo in the documentation here We should make this heuristic clearer. In the next release, we will be refactoring this part of the code so I'll try to improve the documentation. Also, Andreas Kirsch has recently released a new version of their algorithm here: https://github.com/BlackHC/batchbald_redux Did I answer your question correctly? Cheers, |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
Thank you for the Batch BALD implementation.
I am trying to understand it and I am confused with the output size of _sample_from_history. I don't get why we reshape
choices
with dimensions (N x K x S) intoexpanded_choices_N_K_K_S
with dimensions (N x K x K x S).Then the dimension of the output
samples_M_K
is ( (KxS) x K ) whereas I expected it to be (S x K) since S is the number of draws.Thank you for your help,
Romain
Beta Was this translation helpful? Give feedback.
All reactions