You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def__init__(self,
image_path=None,
label_path=None,
mode='train',
transform=None,
download=True,
backend=None):
assertmode.lower() in ['train', 'test'], \
"mode should be 'train' or 'test', but got {}".format(mode)
ifbackendisNone:
backend=paddle.vision.get_image_backend()
ifbackendnotin ['pil', 'cv2']:
raiseValueError(
"Expected backend are one of ['pil', 'cv2'], but got {}"
.format(backend))
self.backend=backendself.mode=mode.lower()
self.image_path=image_pathifself.image_pathisNone:
assertdownload, "image_path is not set and downloading automatically is disabled"image_url=self.TRAIN_IMAGE_URLifmode=='train'elseself.TEST_IMAGE_URLimage_md5=self.TRAIN_IMAGE_MD5ifmode=='train'elseself.TEST_IMAGE_MD5self.image_path=_check_exists_and_download(
image_path, image_url, image_md5, self.NAME, download)
self.label_path=label_pathifself.label_pathisNone:
assertdownload, "label_path is not set and downloading automatically is disabled"label_url=self.TRAIN_LABEL_URLifself.mode=='train'elseself.TEST_LABEL_URLlabel_md5=self.TRAIN_LABEL_MD5ifself.mode=='train'elseself.TEST_LABEL_MD5self.label_path=_check_exists_and_download(
label_path, label_url, label_md5, self.NAME, download)
self.transform=transform
我是一个刚接触paddle和python的小白,不知道理解的对不对。
The text was updated successfully, but these errors were encountered:
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API,FAQ,Github Issue and AI community to get the answer.Have a nice day!
请提出你的问题 Please ask your question
MNIST文档内容如下:

可是我在一些官方实例中看到多了个transform参数,
我知道这个是用来处理图像,但是API文档里没有这个。
我看了下class paddle.vision.datasets.MNIST[源代码]
这里面是有这个参数的,API文档里应该是忘了加上相应的描述?
我是一个刚接触paddle和python的小白,不知道理解的对不对。
The text was updated successfully, but these errors were encountered: