Could you point me to where this reinforce function is defined and implemented? For some weird reason, I keep getting
RuntimeError: reinforce() can be only called on outputs of stochastic functions

when I call reinforce as follows:
"""
   regress input is the output of a multinomial sampling i.e. Variable containing: torch.DoubleTensor of size 4096x1
   r is a Variable containing: 0.2610 [torch.DoubleTensor of size 1]
"""
   regress_input.reinforce(r)