pytorch.github.io icon indicating copy to clipboard operation
pytorch.github.io copied to clipboard

Can't open source of default_collate

Open 4eyes4u opened this issue 3 years ago • 2 comments

📚 Documentation

Clicking the [SOURCE] link in the torch.utils.data.default_collate(batch) section simply isn't working. I was looking at 1.11 docs. Here is full link https://pytorch.org/docs/1.11/_modules/torch/utils/data/_utils/collate.html#default_collate.

If that's intended, please close the issue.

4eyes4u avatar Jun 02 '22 14:06 4eyes4u

and from torch.utils.data import default_collate raise an ImportError

ImportError: cannot import name 'default_collate' from 'torch.utils.data'

but from torch.utils.data._utils.collate import default_collate works.

For pytorch 1.10.

(no documention for default_collate in the document for v1.10).

Maybe they moved an private function out with outdated documentation, I don't think it's intended.

Ledenel avatar Nov 12 '22 11:11 Ledenel

and from torch.utils.data import default_collate raise an ImportError

ImportError: cannot import name 'default_collate' from 'torch.utils.data'

but from torch.utils.data._utils.collate import default_collate works.

For pytorch 1.10.

(no documention for default_collate in the document for v1.10).

Maybe they moved an private function out with outdated documentation, I don't think it's intended.

Same fix also works for pytorch 1.7.0

mnuske avatar Mar 16 '23 11:03 mnuske