Implemented sampling without replacement from arbitrary stochastic computation graphs using stochastic beam search http://jmlr.org/papers/v21/19-985.html. This implementation can be used to implement the Unordered set estimator (Issue #25), MAPO, Rao-blackwellized REINFORCE, and possibly others.
This required implementing AncestralPlate, a special type of Plate that is able to keep track of what samples are being taken at earlier points, can increase the size of samples and can discard samples at later points in the sampling step.
This pull request requires PyTorch 1.5, as it removes the monkey patching design in favour of the newly introduced __torch_function__ magic method.
Implemented sampling without replacement from arbitrary stochastic computation graphs using stochastic beam search http://jmlr.org/papers/v21/19-985.html. This implementation can be used to implement the Unordered set estimator (Issue #25), MAPO, Rao-blackwellized REINFORCE, and possibly others.
This required implementing
AncestralPlate
, a special type ofPlate
that is able to keep track of what samples are being taken at earlier points, can increase the size of samples and can discard samples at later points in the sampling step.This pull request requires PyTorch 1.5, as it removes the monkey patching design in favour of the newly introduced
__torch_function__
magic method.