Cell In[7], line 21 def prepare_loaders(pickle_file, transform, batch_size, target_size):
----> 2 with open(pickle_file, 'rb') as f:
3 split_data = pickle.load(f)
4 train_ds = CustomDataset(split_data['train_img_paths'], split_data['train_mask_paths'], transform=transform, target_size=target_size)
File c:\Users\quari\miniconda3\envs\unet\Lib\site-packages\IPython\core\interactiveshell.py:324, in _modified_open(file, *args, *kwargs)
317 if file in {0, 1, 2}:
318 raise ValueError(
319 f"IPython won't let you open fd={file} by default "
320 "as it is likely to crash IPython. If you know what you are doing, "
321 "you can use builtins' open."
322 )
--> 324 return io_open(file, args, **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: 'train_val_split.pkl'``
When i run train.py it gives me this error.
FileNotFoundError Traceback (most recent call last) Cell In[13], line 1 ----> 1 main()
Cell In[11], line 10 8 transform = transforms.Compose([transforms.ToTensor()]) 9 batch_size = 2 ---> 10 train_loader, val_loader = prepare_loaders('train_val_split.pkl', transform, batch_size, target_size=(720, 401)) 12 num_epochs = 40000 13 checkpoint_path = "checkpoint.pth.tar"
Cell In[7], line 2 1 def prepare_loaders(pickle_file, transform, batch_size, target_size): ----> 2 with open(pickle_file, 'rb') as f: 3 split_data = pickle.load(f) 4 train_ds = CustomDataset(split_data['train_img_paths'], split_data['train_mask_paths'], transform=transform, target_size=target_size)
File c:\Users\quari\miniconda3\envs\unet\Lib\site-packages\IPython\core\interactiveshell.py:324, in _modified_open(file, *args, *kwargs) 317 if file in {0, 1, 2}: 318 raise ValueError( 319 f"IPython won't let you open fd={file} by default " 320 "as it is likely to crash IPython. If you know what you are doing, " 321 "you can use builtins' open." 322 ) --> 324 return io_open(file, args, **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: 'train_val_split.pkl'``