import os
import cv2
import paddle
import numpy as np
from glob import glob
from paddle import fluid
from pprint import pprint
from paddle.fluid import ParamAttr
##pprint(dir(paddle))
def make_cifar10_reader():
xRt="A:/dataSet/class/Cifar10/images"
totalfileList,totalLabelList=[],[]
for fdidx in range(10):
folder=xRt+"/"+str(fdidx)
itemList = os.listdir(folder+"/")
itemList=[item for item in itemList if(item.endswith(".jpg"))]
itemList=["/"+str(fdidx)+"/"+it for it in itemList]
totalfileList.extend(itemList)
totalLabelList.extend([fdidx for k in range(len(itemList))])
newIndexes=np.array(range(len(totalLabelList)))
np.<
paddle中使用create_py_reader_by_data读取数据并与计算图衔接
最新推荐文章于 2023-11-18 16:41:45 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)