报错

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[11], line 2
      1 batch_size, num_steps = 1, 35
----> 2 train_iter, vocab = d2l.load_data_time_machine(batch_size, num_steps)

AttributeError: module 'd2l.torch' has no attribute 'load_data_time_machine'

原因:d2l版本过高

解决:

pip install d2l==0.17.5

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐