Skip to content

Runtime difference: Jupyter Notebook vs Python Script #643

Answered by HripsimeS
HripsimeS asked this question in Q&A
Discussion options

You must be logged in to vote

The issue is fixed by modifying the DataLoading part, changing from Dataset to CacheDataset.

train_ds = CacheDataset(data=train_files, transform=train_transforms, cache_rate=1.0, num_workers=0)
train_loader = DataLoader(train_ds, batch_size=2, shuffle=True, num_workers=0)

val_ds = CacheDataset(data=val_files, transform=val_transforms, cache_rate=1.0, num_workers=0)
val_loader = DataLoader(val_ds, batch_size=1, num_workers=0)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by HripsimeS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant