Image Classification Data (Fashion-MNIST)

https://d2l.ai/chapter_linear-networks/image-classification-dataset.html

Thank you for your really well-written book. In the getting the data part, you have used double import sys statements.

I did not understand this part. What does β€˜β€˜sys’’ works for.
import sys
sys.path.insert(0, β€˜β€¦β€™)

thanks

We use this statement so that we can import and use some python files written in some β€œpath” directory. So sys.path.insert(0, path) will add path in our imports. And now we can import files from β€œpath”.
I hope that makes sense.

1 Like

Thank you very much:smile:

Why we use transform_first not transform?

while running:
train_iter = gluon.data.DataLoader(mnist_train.transform_first(transformer), batch_size, shuffle=True, num_workers=get_dataloader_workers())

I get the following error:

lib/python3.7/site-packages/mxnet/gluon/data/dataloader.py", line 678, in __del__ AttributeError: 'NoneType' object has no attribute 'Pool'