This answer said DataLoader will use default_collate
to handle Dataset’s return value implicitly when collate_fn
is undefined, maybe. But DataLoader’s default argument for collate_fn
is actually None
, inducing developer hard to find out that DataLoader will use default_collate
implicitly when collate_fn
is undefined.
The collate_fn
is either set to detault_collate
or default_convert
based on the internal attribute self._auto_collation
as seen here which is most likely the reason it’s set to None
.