I can't get ag news data with train_iter, test_iter = AG_NEWS(split=('train', 'test')) online because of my bad connection. So I download the the train.csv and test.csv manually to my local folder AG_NEWS from url 'train': "https://raw.githubusercontent.com/mhjabreel/CharCnn_Keras/master/data/ag_news_csv/train.csv", 'test': "https://raw.githubusercontent.com/mhjabreel/CharCnn_Keras/master/data/ag_news_csv/test.csv"
After that I tried to load ag news data with train_iter, test_iter = AG_NEWS(root = './AG_NEWS', split=('train', 'test')), throw a exception RuntimeError: The hash of /myfolder/AG_NEWS/train.csv does not match. Delete the file manually and retry.
How to load AG_NEWS data from local files
I can't get ag news data with
train_iter, test_iter = AG_NEWS(split=('train', 'test'))
online because of my bad connection. So I download the thetrain.csv
andtest.csv
manually to my local folderAG_NEWS
from url'train': "https://raw.githubusercontent.com/mhjabreel/CharCnn_Keras/master/data/ag_news_csv/train.csv", 'test': "https://raw.githubusercontent.com/mhjabreel/CharCnn_Keras/master/data/ag_news_csv/test.csv"
After that I tried to load ag news data with
train_iter, test_iter = AG_NEWS(root = './AG_NEWS', split=('train', 'test'))
, throw a exceptionRuntimeError: The hash of /myfolder/AG_NEWS/train.csv does not match. Delete the file manually and retry.
My file content is