Open jingweiz opened 3 years ago
Hi!
This is correct. The reason that there is a steps dimension is that this can be used to evaluate the model on a given tour in a single forward pass, which is much more efficient than one step at the time. This could be useful for, e.g., supervised training (teacher forcing) or things like experience replay. This code is a leftover of some early experiments in that direction which I thought may still be useful to somebody.
Wouter
Hi, thanks for making the code public! I have a question regarding the function
_get_parallel_step_context
: Here, https://github.com/wouterkool/attention-learn-to-route/blob/c66da2cfdc9ae500150bfc34d597a33631d2ceb3/nets/attention_model.py#L378,num_steps
would always be1
as thecurrent_node
reads theprev_a
of the tsp state, so then this means that https://github.com/wouterkool/attention-learn-to-route/blob/c66da2cfdc9ae500150bfc34d597a33631d2ceb3/nets/attention_model.py#L427 will always be hit, and the lines from436
to449
will never be used, is this correct or am I missing sth here? Thanks in advance and looking forward for your reply! Jingwei