Mapleaves not found?

I was trying to map a layer into Cuda following the tutorial at
However, when I tried, it said mapleaves not defined. Is the method deprecated? If so, what is the proper way of doing it?

That’s an old version of the docs. Flux is on v0.10, and somehow you found the v0.4 docs. You might want to move to a newer version of the documentation:

It worked, many thanks.