Skip to content

Fix data_tutorial.py #2445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions beginner_source/basics/data_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
# - ``download=True`` downloads the data from the internet if it's not available at ``root``.
# - ``transform`` and ``target_transform`` specify the feature and label transformations

############################################################
# Loading a Dataset
# -------------------
# Add these 2 lines of code to control the environment, in case Conda is used.
#

import os
os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
Comment on lines +53 to +54
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @ver2king , but as mentioned in #1692 (comment) I'm not sure we actually need to do anything. CC @svekars


import torch
from torch.utils.data import Dataset
Expand Down