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

error in graph encoder #6

Open
kazemianie opened this issue Jul 9, 2023 · 0 comments
Open

error in graph encoder #6

kazemianie opened this issue Jul 9, 2023 · 0 comments

Comments

@kazemianie
Copy link

Hello i want to run your great work but i got an error in graph encoder

File "run.py", line 181, in
run(get_options())
File "run.py", line 112, in run
baseline = RolloutBaseline(model, problem, opts)
File "/home/imanka/DDVRP/fleet_v5/reinforce_baselines.py", line 151, in init
self._update_model(model, epoch)
File "/home/imanka/DDVRP/fleet_v5/reinforce_baselines.py", line 171, in _update_model
self.bl_vals = rollout(self.model, self.dataset, self.opts).cpu().numpy()
File "/home/imanka/DDVRP/fleet_v5/train.py", line 46, in rollout
in tqdm(DataLoader(dataset, batch_size=opts.eval_batch_size), disable=opts.no_progress_bar)
File "/home/imanka/DDVRP/fleet_v5/train.py", line 45, in
for bat
File "/home/imanka/DDVRP/fleet_v5/train.py", line 39, in eval_model_bat
cost, _, _ = model(move_to(bat, opts.device))
File "/home/imanka/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/imanka/DDVRP/fleet_v5/nets/attention_model.py", line 142, in forward
embeddings, _ = self.embedder(self._init_embed(input))
File "/home/imanka/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/imanka/DDVRP/fleet_v5/nets/graph_encoder.py", line 206, in forward
h = self.layers(h)
File "/home/imanka/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/imanka/.local/lib/python3.7/site-packages/torch/nn/modules/container.py", line 204, in forward
input = module(input)
File "/home/imanka/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/imanka/.local/lib/python3.7/site-packages/torch/nn/modules/container.py", line 204, in forward
input = module(input)
File "/home/imanka/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/imanka/DDVRP/fleet_v5/nets/graph_encoder.py", line 15, in forward
return input + self.module(input) # skip connection
File "/home/imanka/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/imanka/DDVRP/fleet_v5/nets/graph_encoder.py", line 72, in forward
batch_size, graph_size, input_dim = h.size() # input_dim=embed_dim
ValueError: not enough values to unpack (expected 3, got 2)

does anybody know how to solve it?

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

1 participant