importing error default_collate is not defined
I tried to import default_collate from torch.utils.data.dataloader but it gives me default_collate is not exsit and another function is exist (_collate_fn_t)
from torch.utils.data.dataloader import default_collate
from torch.utils.data.dataloader import _collate_fn_t
Are these commands are similar

The _collate_fn_t is the type definition of a collate function in general, it is defined here as:
_collate_fn_t = Callable[[List[T]], Any]

default_collate is the default collate function used by the DataLoader class.
Importing these is not equivalent, you should check your spelling and try again with:
from torch.utils.data.dataloader import default_collate

