Skip to content

Commit 62468fa

Browse files
Replace deprecated CUDA check (#2621)
Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
1 parent b55fdc8 commit 62468fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intermediate_source/reinforcement_ppo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
# actually return ``frame_skip`` frames).
138138
#
139139

140-
device = "cpu" if not torch.has_cuda else "cuda:0"
140+
device = "cpu" if not torch.cuda.is_available() else "cuda:0"
141141
num_cells = 256 # number of cells in each layer i.e. output dim.
142142
lr = 3e-4
143143
max_grad_norm = 1.0

0 commit comments

Comments
 (0)