Iterables vs iterators: how does a for loop work, and how does PyTorch use this?
Interview insights are lockedSee how often this is asked and which companies asked it with Buncho Pro.What is the difference between an iterable and an iterator?
- Describe what
for x in obj:does under the hood. - Write a small re-iterable class.
- How does this relate to map-style and iterable-style datasets in PyTorch?