Closed yanghaoxiang7 closed 2 years ago
BTW, I can run the training code with A2C and the testing code.
I see that there's a possible way to add to "mask value" but I couldn't find it in config.py
bug fixed. Problem at acktr/algo/kfac.py. I don't know why but torch.symeig is only compatible under CPU. Running under GPU will lead to a segmentation fault. Solution:
self.d_g[m], self.Q_g[m] = torch.symeig(
self.m_gg[m].cpu(), eigenvectors=True)
self.d_g[m], self.Q_g[m] = self.d_g[m].cuda(), self.Q_g[m].cuda()
self.d_a[m], self.Q_a[m] = torch.symeig(
self.m_aa[m].cpu(), eigenvectors=True)
self.d_a[m], self.Q_a[m] = self.d_a[m].cuda(), self.Q_a[m].cuda()
I'm using torch1.7.1 + cuda 11. Not sure why this happen.
BTW, I can run the training code with A2C and the testing code.
how to train this model with a2c?
when I run this training code with a2c will have a mistake as follow
Traceback (most recent call last):
File "main.py", line 233, in
BTW, I can run the training code with A2C and the testing code.
how to train this model with a2c? when I run this training code with a2c will have a mistake as follow Traceback (most recent call last): File "main.py", line 233, in main(args) File "main.py", line 24, in main train_model(args) File "main.py", line 99, in train_model args.lr, AttributeError: 'Namespace' object has no attribute 'lr'
Your errors indicates that your "args" does not have "lr". "lr" is the learning rate and is typically passed through the command line arguments ("args"). Check whether you run the code according to authors' information and you can directly use print("args:", args) to debug. Hope these helps.
@alexfrom0815
During training I meet with a problem:
Debugging by printing out information, I found the problem of a segmentation fault around here:
I guess my problem is at torch.symeig, since I found several issues about this. But different from their running, the code stopped at the first episode (instead of stopping after several hours of training). Is there any solution to this problem? Great thanks!