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 ppo.py #163

Closed bokveizen closed 5 months ago

bokveizen commented 5 months ago

Description

Added sub_td = sub_td.to(td.device) to make sure sub_td is on the same device as td.

Motivation and Context

In the previous version, sub_td.device can be None

Types of changes

What types of changes does your code introduce? Remove all that do not apply:

Checklist

Go over all the following points, and put an x in all the boxes that apply. If you are unsure about any of these, don't hesitate to ask. We are here to help!

fedebotu commented 5 months ago

Quickdraw!