from tensorflow.python.keras.datasets.cifar100 import load_data
(origin_x, origin_y), (test_x, test_y) = load_data()
from keras.datasets import cifar100
(x_train, y_train), (x_test, y_test) = cifar100.load_data()
위와 같은 코드를 사용해 cifar100이나 cifar10을 load했을 시에 아래와 같은 오류가 발생할 경우가 있다. tensorflow의 패키지를 이용해서 불러오는 작업이기 때문에 코드상에선 문제가 발생할 수없음...
초기에 코드를 실행 하면 데이터가 없으면 다운 받게 된다.
리눅스 경로에서는 /.keras/datasets 폴더로 다운이 받게됨.
cifar-100-python.tar.gz 파일이 받아지고 압축을 풀어 cifar-100-python 폴더에 저장됨.
다운로드 중에 문제가 생겻다고 생각해 위의 파일들을 지우고, 데이터를 다시 받아주니 해결.
File "/data1/workspace/jooyoung/calibration/LG/ece/test.py", line 6, in
(x_train, y_train), (x_test, y_test) = cifar100.load_data()
File "/usr/local/lib/python3.5/dist-packages/keras/datasets/cifar100.py", line 34, in load_data
x_train, y_train = load_batch(fpath, label_key=label_mode + '_labels')
File "/usr/local/lib/python3.5/dist-packages/keras/datasets/cifar.py", line 27, in load_batch
d = cPickle.load(f, encoding='bytes')
EOFError: Ran out of input
'Information > IT' 카테고리의 다른 글
ubuntu 20.04 server hidden wifi connection (0) | 2023.01.04 |
---|---|
자주 쓰는 linux 명령어 (0) | 2020.09.10 |
딥러닝 서버 컴퓨터 GPU 추천 및 쿨러 타입 - 블로워(Blower) 타입 (2) | 2019.02.05 |
pip install error Could not install packages due to an EnvironmentError: [WinError 5] 액세스가 거 부되었습니다: (0) | 2018.12.17 |
Linux python matplot RuntimeError: Invalid DISPLAY variable (0) | 2018.12.04 |