Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For: Issue for "AttributeError: 'SQDDPG' object has no attribute 'agent_importance_vec'" #20

Closed
yqlwqj opened this issue Nov 8, 2022 · 1 comment

Comments

@yqlwqj
Copy link

yqlwqj commented Nov 8, 2022

Hi, I am try reproducing results and have following issue in "sqddpg_33_0_l1.out" while doing "source train_case33.sh 0 l1 reproduction"
Traceback (most recent call last):
File "train.py", line 115, in
train.run(stat, i)
File "/home/ben/ben/MAPDN/utilities/trainer.py", line 111, in run
self.behaviour_net.train_process(stat, self)
File "/home/ben/ben/MAPDN/models/model.py", line 213, in train_process
value = self.value(state_, action_pol)
File "/home/ben/ben/MAPDN/models/sqddpg.py", line 108, in value
return self.marginal_contribution(obs, act)
File "/home/ben/ben/MAPDN/models/sqddpg.py", line 66, in marginal_contribution
subcoalition_map, grand_coalitions, individual_map = self.sample_grandcoalitions(batch_size) # shape = (b, n_s, n, n)
File "/home/ben/ben/MAPDN/models/sqddpg.py", line 38, in sample_grandcoalitions
agent_importance_vec = self.agent_importance_vec.unsqueeze(0).expand(batch_size*self.sample_size, self.n_)
File "/home/ben/anaconda3/envs/mapdn/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1266, in getattr
type(self).name, name))
AttributeError: 'SQDDPG' object has no attribute 'agent_importance_vec'

May you help for this?

thanks

@hsvgbkhgbv
Copy link
Member

Hi,

I've fixed the bug. Plesae try it again.

Best,
Jianhong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants