Skip to content

Commit

Permalink
Fix message shape bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhilong committed Feb 23, 2024
1 parent 6d6e8ea commit ef5dacf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/agents/rnn_communicating_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def forward(self, inputs, hidden_state):

am_inputs = taus.reshape((prev_message.shape[0], -1))
new_message = self.am.forward(am_inputs, prev_message)
pi_input_message = th.cat([new_message]*5, 0).reshape(new_message.shape[0], -1)
pi_input_message = th.cat([new_message]*self.n_agents, 0).reshape(new_message.shape[0], -1)

action, h_pi = self.pi(observation, pi_input_message, h_pi)
hidden_state = th.cat([h_fa, h_fo, h_pi], -1)
Expand Down

0 comments on commit ef5dacf

Please sign in to comment.