ssp
ssp copied to clipboard
AttributeError: 'Linear' object has no attribute '_cached_edge_index'
I met a problem that "AttributeError: 'Linear' object has no attribute '_cached_edge_index'" when I run the code 'gcn.py' at the time I set "--preconditioner = KFAC". I will appreciate it if anyone could help me.
I met a problem that "AttributeError: 'Linear' object has no attribute '_cached_edge_index'" when I run the code 'gcn.py' at the time I set "--preconditioner = KFAC". I will appreciate it if anyone could help me.
I got the same problem. Authors of this repo might help us.
I tried some ways to fix this error. But the result with KFAC is so pool! Just in init function of KFAC
for sub_mod in mod.modules(): if hasattr(sub_mod, '_cached_edge_index'): print(f"+register_backward_hook _cached_edge_index@{sub_mod}") handle = sub_mod.register_backward_hook(self._save_grad_output) self._bwd_handles.append(handle)
I think I managed to fix the error. #3 to reproduce the result of the paper use this command. -> python gcn.py --dataset=Cora --split=complete --optimizer=Adam --preconditioner=KFAC --eps 0.21544346900318823 --logger=test --hidden 64
I think I managed to fix the error. #3 to reproduce the result of the paper use this command. -> python gcn.py --dataset=Cora --split=complete --optimizer=Adam --preconditioner=KFAC --eps 0.21544346900318823 --logger=test --hidden 64
I meet another error when I use this command: AttributeError: 'KFAC' object has no attribute '_fwd_handles' Do you have any idea why it happened?
I met a problem that "AttributeError: 'Linear' object has no attribute '_cached_edge_index'" when I run the code 'gcn.py' at the time I set "--preconditioner = KFAC". I will appreciate it if anyone could help me.
I met a problem that "AttributeError: 'Linear' object has no attribute '_cached_edge_index'" when I run the code 'gcn.py' at the time I set "--preconditioner = KFAC". I will appreciate it if anyone could help me.
for me, the error occurred due to torch_geometric version. one simple solution might be downgrading the torch_geometric. or you could just copy the gcn layer code from the previous torch_geometric like I did #3
I meet another error when I use this command: AttributeError: 'KFAC' object has no attribute '_fwd_handles' Do you have any idea why it happened?
hmmm not sure, I don't think I met that error. maybe downgrading the torch_geometric and rerunning with the original code might work.