Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIFAR_INPUT_ITER类_init_函数中np.save/np.load的作用 #18

Open
imyangs opened this issue Dec 3, 2019 · 1 comment
Open

CIFAR_INPUT_ITER类_init_函数中np.save/np.load的作用 #18

imyangs opened this issue Dec 3, 2019 · 1 comment

Comments

@imyangs
Copy link

imyangs commented Dec 3, 2019

我删除了CIFAR_INPUT_ITER类_init_函数中的np.save/np.load代码,代码执行会报下面的错误
image

所以想请教一下这段代码在这里起到的作用是?

DataLoaders_DALI/cifar10.py

Lines 121 to 122 in 28e2308

np.save("cifar.npy", self.data)
self.data = np.load('cifar.npy') # to serialize, increase locality

@tanglang96
Copy link
Owner

这里是为了让数据能连续存储,dali要求数据的存储是连续的来增加locality,提高访问速度

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants