d2l-ai / d2l-en

Interactive deep learning book with multi-framework code, math, and discussions. Adopted at 500 universities from 70 countries including Stanford, MIT, Harvard, and Cambridge.
https://D2L.ai
Other
22.45k stars 4.19k forks source link

replace arange with range #2599

Open GoodCoder666 opened 1 month ago

GoodCoder666 commented 1 month ago

Description of changes:

arange is used here in the expression generating a list of legends:

legend=["Col %d" % d for d in d2l.arange(6, 10)]

I think it's better to use the builtin range here (as the created tensor is only looped through with d).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.