Skip to content
New issue

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

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

Already on GitHub? # to your account

'numpy.ndarray' object has no attribute 'dim' #8

Open
kulasimu opened this issue Oct 30, 2020 · 1 comment
Open

'numpy.ndarray' object has no attribute 'dim' #8

kulasimu opened this issue Oct 30, 2020 · 1 comment

Comments

@kulasimu
Copy link

Hi, when I try to run the program with test mode, the error occurs. It shows 'numpy.ndarray' object has no attribute 'dim'. The error is located at solver.py, line 376, "edges_logits, nodes_logits = self.G(z)"
I tried several solutions on google but they didn't work. Could someone tell me what's the problem?

@yateeshagrawal
Copy link

In "def test(self):", z needs to be converted to torch tensor. So simply add "z = torch.from_numpy(z).to(self.device).float()" in a new line just after "z = self.sample_z(a.shape[0])".

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

No branches or pull requests

2 participants