Flux error

using Flux.Data: DataLoader I am getting error that Data is not defined?

Where did you read that? It was like that in very old flux’s versions. Now it is just using Flux: DataLoader. And the DataLoader is actually implemented in MLUtils.jl if you want to use it independently from Flux.