ai4co / rl4co

A PyTorch library for all things Reinforcement Learning (RL) for Combinatorial Optimization (CO)
https://rl4.co
MIT License
381 stars 70 forks source link

Update edge.py #159

Closed bokveizen closed 5 months ago

bokveizen commented 5 months ago

edge_attr should have the same length as the number of edges not nodes

bokveizen commented 5 months ago

I think n was defined just few lines above, so in this case we should delete that as well? This said it seems correct to me, could you verify @Furffico ?

n is used for get_full_graph_edge_index though.

Furffico commented 5 months ago

I think n was defined just few lines above, so in this case we should delete that as well? This said it seems correct to me, could you verify @Furffico ?

Yes, it is correct for edge_attr to have the same length as the number of edges.

fedebotu commented 5 months ago

LGTM!