I get the following error {the last line shown} regarding the path. "The system cannot find the path specified: './Data/train' "
The location of the train folder is correct. Do I have the format wrong?
In the main file, main.py:
In another file, dataset.py:
The location of the train folder is correct. Do I have the format wrong?
In the main file, main.py:
1 2 |
train_dir = os.path.join(data_dir, 'C:\Documents\Pyro\dogs-vs-cats\train' ) train_dataset = datasetloader(train_dir, transform = train_transform) * * error * * |
1 2 3 |
class datasetloader(Dataset): def __init__( self , path, transform = None ): self .classes = os.listdir(path) ##the error causing line **error** |
Larz60+ write Oct-30-2023, 02:53 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Modified for you this time. Please use BBCode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Modified for you this time. Please use BBCode tags on future posts.