属性错误:模块'helpers'没有属性'load_dataset'



尝试导入并运行helpers.load_dataset(path)helpers.standardize(list),但显示模块'helpers' has no attribute 'load_dataset'

尝试= =比;!wget -c https://raw.githubusercontent.com/udacity/deep-learning-v2-pytorch/master/intro-to-pytorch/helper.py

尝试= =比;!pip安装助手,但没有任何工作,即使重新启动运行时。

如何使模块helpers.__()工作?我错过了什么?

import numpy as np
import matplotlib.image as mping 
import matplotlib.pyplot as plt
import cv2
%matplotlib inline
!wget -c https://raw.githubusercontent.com/udacity/deep-learning-v2-pytorch/master/intro-to-pytorch/helper.py
import helpers
import importlib
importlib.reload(helpers)
image_dir= "./folder"
image_list = helpers.load_dataset(image_dir)

error as:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-7-66931d7c842b> in <module>
----> 1 image_list = helpers.load_dataset(image_dir)
AttributeError: module 'helpers' has no attribute 'load_dataset'

!wget -c https://raw.githubusercontent.com/udacity/deep-learning-v2-pytorch/master/intro-to-pytorch/helper.py导入helper.py,其中没有定义load_dataset方法。

在整个存储库中最接近load_dataset的方法是load_data: https://github.com/udacity/deep-learning-v2-pytorch/blob/adebdc96f04362968144f2ab2a267563c9a2554e/project-tv-script-generation/helper.py#L9

相关内容

  • 没有找到相关文章

最新更新