报错问题:AttributeError: module ‘d2l‘ has no attribute ‘load_array‘

学习李沐老师在B站上讲的《动手学习深度学习pytorch版》时,运行d2l.load_array()出现错误。

 报错问题:AttributeError: module ‘d2l‘ has no attribute ‘load_array‘_第1张图片

重新下载了很多版本都没有找到问题。

最后发现时导入包时出现错误。

将 import d2l 

修改为 from d2l import torch as d2l

即可解决

你可能感兴趣的:(机器学习,深度学习,pytorch,人工智能)