Closed soada closed 5 years ago
Hi,
You can use this flag (https://github.com/shariqiqbal2810/MAAC/blob/master/utils/critics.py#L162) to return the attention weights of each each agent over the other agents for all the time points that are passed in as input.
Thanks for the instructions! But I still have two questions:
The flag is simply used whenever you call the forward pass on the critic module. Example:
critic = AttentionCritic(sa_sizes)
rets = critic(return_q=True, return_attend=True)
# rets[0][0] contains Q-value for agent 0 corresponding to inputs and rets[0][1] contains attention weights for agent 0
As such, the attention weights are calculated for whatever states and actions you pass into the critic during the forward pass, so you can calculate the attention weights both during training and execution if you would like.
Thanks for your advice! In the execution process, the agents only get observations.
Thank you very much! In fact, the figure I have mentioned is the following one (maybe figure 7 in your final version), whose caption is " Attention weights when subjected to different Tower pairings for Rover 1 in Rover-Tower environment ": Are the attention weights calculated in the training process averaged over several times or execution process?
Oh I see. These are calculated from a single timepoint during execution.
Hi,
You can use this flag (https://github.com/shariqiqbal2810/MAAC/blob/master/utils/critics.py#L162) to return the attention weights of each each agent over the other agents for all the time points that are passed in as input.
Hi, sir, is the all_attend_probs[i]
the attention weights of agent i
or it is the attention weights of other agents except itself?
Hi, thanks for your great job! I have a question on how to visualize the attention weights between agents in the testing phase, i.e., Figure 6 in your article. Could you please give me some advice? Thank you very much!