In python we can do
m = Categorical(probs)  <----
action = m.sample()

How can I sample from a given categorical distribution in libtorch? I’ve searched the docs but I can’t find any matching function in the C++ frontend. If it’s not implemented yet, what would be the most efficient way to sample that way for now? I could use std’s discrete_distribution, but seems a bit too much like a workaround