Fastai's collection - L list

This article (https://www.fast.ai/2020/02/13/fastai-A-Layered-API-for-Deep-Learning/) references the list L that is defined. I am interested in digging a little bit deeper into the code for L. I have looked, but can’t find it. Anyone know where I might find the source code for the L list that is defined in v2 please?

Many thanks!

2 Likes

It’s in fastcore :slight_smile:

http://fastcore.fast.ai/foundation#L

5 Likes

@iamholmes thanks for sharing the fastai article. In it, I found a perfect map of fastai’s layered API:

About L:

L is a fastai function that converts a regular list into a fastai list. This conversion is important as fastai lists offer extra functionality and are more efficient in terms of both performance and memory usage.

  • Additional functionality such as .map() method

  • Efficient indexing of arrays, tensors, and DataFrames

  • Modifiable with append, +, and * operations

  • Supports various methods such as sum, product, map, cycle, shuffle

  • Constructed from any iterable and is a Sequence

  • Context-dependent functionality for simplifying code

To see a demonstration of L’s functionality go directly to corrected link: fastcore - Foundation