Skip to content
#

tensor

Here are 276 public repositories matching this topic...

Flamefire
Flamefire commented Oct 15, 2020

During debugging I've seen many constructs like list(map(lambda i: torch.device('cuda:' + str(i)), gpus))

I'd propose to replace those by "regular" list comprehensions. So the above is equivalent to [torch.device('cuda:' + str(i)) for i in gpus]

This replacement can be automated via regexp replacement for (likely) almost all cases.

Reasoning: The nesting of parentheses and the inline

Improve this page

Add a description, image, and links to the tensor topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the tensor topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.