You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm currently developing my own environment and following the training script given in the example (i.e. I do on_policy sampling using the forward policy), and I'm a little bit confused about the following redundancy:
during the sequential sampling process, at each step, the current state calls the update_masks method in its initialization method, which sets up the forward_masks and backward_masks.
once the sampling is done, the trajectories are batched into a new States object in the default samplers.py:
which essentially does the same thing. This new state is initialized and then call update_masks on all the states (in the trajectories of states) again, which I believe has been already calculated once in step 1. So why bother repeating this process and not reusing the already computed masks?
Lots of thanks for any explanation for this :).
The text was updated successfully, but these errors were encountered:
Thanks for this great point. We need a States.stack() method or stack_states() function which will accept a list of states to avoid this recomputation. Addressed in #161 .
And this stack_states method would extend all relevant attributes of the submitted states along the trajectory dim, and would return a Trajectories object.
Hi, I'm currently developing my own environment and following the training script given in the example (i.e. I do
on_policy
sampling using the forward policy), and I'm a little bit confused about the following redundancy:update_masks
method in its initialization method, which sets up theforward_masks
andbackward_masks
.States
object in the defaultsamplers.py
:(p.s. I think in the nightly version this is changed to)
torchgfn/src/gfn/samplers.py
Line 225 in 3276492
which essentially does the same thing. This new state is initialized and then call
update_masks
on all the states (in the trajectories of states) again, which I believe has been already calculated once in step 1. So why bother repeating this process and not reusing the already computed masks?Lots of thanks for any explanation for this :).
The text was updated successfully, but these errors were encountered: