this is full log error
AttributeError                            Traceback (most recent call last)
 in ()
1 x=[]
----> 2 for i, data in enumerate(dataloader1):
3   inps, labs = data
4   x.append
5
3 frames
/usr/local/lib/python3.6/dist-packages/torch/_utils.py in reraise(self)
393             # (https://bugs.python.org/issue2651), so we work around it.
394             msg = KeyErrorMessage(msg)
–> 395         raise self.exc_type(msg)
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/worker.py”, line 185, in _worker_loop
data = fetcher.fetch(index)
File “/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py”, line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File “/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py”, line 44, in 
data = [self.dataset[idx] for idx in possibly_batched_index]
File “”, line 45, in getitem
if self.train:
AttributeError: ‘LFW1’ object has no attribute ‘train’
so when it true it will be train and fauls will be test data, So i want to make a function that if i put data or path way in data will load