0

I am doing the fastai course for deep learning. I am confused with the initialization of DataLoaders class. Here is the code:

class DataLoaders(GetAttr):
    "Basic wrapper around several `DataLoader`s."
    _default='train'
    def __init__(self,
        *loaders,          # `DataLoader` objects to wrap
        path:str|Path='.', # Path to store export objects
        device=None        # Device to put `DataLoaders`
    ):
        self.loaders,self.path = list(loaders),Path(path)
        if device is not None or hasattr(loaders[0],'to'):    
               self.device = device

My question is: in the path argument, what does str|Path means?

Pranav Hosangadi
  • 23,755
  • 7
  • 44
  • 70
Plemath
  • 101

0 Answers0