Using dataloader RecursionError: maximum recursion depth exceeded while calling a Python object

I think there is something wrong with the __getitem__ so I find this post, which suggests that instead of using the recursion, we could add a _name