Skip to content

Commit 7f7cbac

Browse files
committed
Fix data_tutorial.py
Add the following 2 lines of code for env compatibility (in case Conda is used): import os os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
1 parent eaa2e90 commit 7f7cbac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

beginner_source/basics/data_tutorial.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@
4444
# - ``download=True`` downloads the data from the internet if it's not available at ``root``.
4545
# - ``transform`` and ``target_transform`` specify the feature and label transformations
4646

47+
############################################################
48+
# Loading a Dataset
49+
# -------------------
50+
# Add these 2 lines of code to control the environment, in case Conda is used.
51+
#
52+
53+
import os
54+
os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
4755

4856
import torch
4957
from torch.utils.data import Dataset

0 commit comments

Comments
 (0)