kevinzakka / recurrent-visual-attention

A PyTorch Implementation of "Recurrent Models of Visual Attention"
MIT License
468 stars 123 forks source link

BUG? #13

Closed yufengwhy closed 6 years ago

yufengwhy commented 6 years ago

https://github.com/kevinzakka/recurrent-visual-attention/blob/master/model.py#L110

This line should be deleted? Because log_pi is a vector of length (B,) in the last line, we dont need sum by dim=1

kevinzakka commented 6 years ago

You have B values each with 2 values (x, y). Read the comments, it explains why we sum along the dimension 1.

yufengwhy commented 6 years ago

@kevinzakka Thank you very much for your code to understand the paper, but some small querstions:

  1. The paper said action_network is also a sample from Gauss distribution, but this is not?
  2. The paper dont say anything about reparameterization trick in location_network, i wonder if the trick is a custom trick?
  3. Is reinforce algorithm always with sampling from some distribution? If not, a counterexample?