HEmile / storchastic

Stochastic Automatic Differentiation library for PyTorch.
GNU General Public License v3.0
180 stars 5 forks source link

Methods for k-subset selection #107

Open sscardapane opened 1 year ago

sscardapane commented 1 year ago

Hi, this looks like a very nice project and I apologize if the question is trivial, but I have not found a clear answer in the documentation. Do you have methods already implemented for $k$-subset sampling from a set? For example, with Gumbel-Softmax we can easily sample an ordered sequence of $k$ elements without replacement by computing top-k on the sample [1], and ignoring the ordering to obtain subset sampling. I was wondering what methods in the library can be used to this end and if you have some tutorial code.

[1] https://www.ijcai.org/Proceedings/2019/0544.pdf