ShusenTang / Dive-into-DL-PyTorch

本项目将《动手学深度学习》(Dive into Deep Learning)原书中的MXNet实现改为PyTorch实现。
http://tangshusen.me/Dive-into-DL-PyTorch
Apache License 2.0
18.17k stars 5.38k forks source link

5.5节 train_ch5参数中的batch_size没有用上? #111

Open fengxijia opened 4 years ago

fengxijia commented 4 years ago

bug描述 train_ch5参数中的batch_size没有用上。请问应该如何理解呢。 image

版本信息 pytorch: 1.2.0 torchvision: 0.4.0 torchtext: 0.4.0 windows10+Jupyter notebook

anonymouss commented 4 years ago

确实,可能是拷贝 train_ch3时的笔误

xiali-github commented 4 years ago

batch_size = 256 train_iter, test_iter = d2l.load_data_fashion_mnist(batch_size=batch_size)

我做5.5节时出现下面的报错: Traceback (most recent call last): File "e:/python1/lesson/LeNet.py", line 38, in train_iter, test_iter = d2l.load_data_fashion_mnist(batch_size) AttributeError: module 'd2lzh_pytorch' has no attribute 'load_data_fashion_mnist' 是因为版本号不匹配吗?

版本信息: pytorch: 1.0.1 torchvision: 0.2.2 torchtext: 0.6.0 windows7+VS code