# Can’t generate my own dataset using load\_dataset

**URL:** <https://discuss.huggingface.co/t/can-t-generate-my-own-dataset-using-load-dataset/85620>\
**Category:** Beginners\
**Created:** [May 7, 2024, 11:28am UTC](https://discuss.huggingface.co/t/can-t-generate-my-own-dataset-using-load-dataset/85620 "2024-05-07T11:28:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrianoggm](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Adrianoggm](https://discuss.huggingface.co/u/Adrianoggm)\
**Post date:** [May 7, 2024, 11:28am UTC](https://discuss.huggingface.co/t/can-t-generate-my-own-dataset-using-load-dataset/85620/1 "2024-05-07T11:28:58Z")

</div>

I am trying to upload an image dataset to huggingface but im facing problems with load\_dataset function.  
the code:  
for fold in tqdm(range(FOLDS\_N), “Uploading Fold”):  
print(“fold:”, fold)  
train\_dataset = load\_dataset(“imagefolder”, data\_dir=f"{DRIVE\_RP\_FOLDER}/{FOLDS\_N}-fold/fold-{fold}“, split=f"train”)  
train\_dataset.push\_to\_hub(f"{HUGG\_DATASET\_NAME}_fold_{fold}“, private=HUGG\_DATASET\_IS\_PRIVATE)  
train\_dataset = load\_dataset(“imagefolder”, data\_dir=f”{DRIVE\_RP\_FOLDER}/{FOLDS\_N}-fold/fold-{fold}“, split=f"test”)  
train\_dataset.push\_to\_hub(f"{HUGG\_DATASET\_NAME}_fold_{fold}", private=HUGG\_DATASET\_IS\_PRIVATE)  
The execution msg that I obtained was .

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/c/e/ce21e2a96b2c9ea91563640536ba45da712f4e84.png)

also the images has the following format 128x128 pixels  
names 1600x1.png 1600x2.png

I watched the path and seems to be ok.

DRIVE\_RP\_FOLDER=  
/home/adrianoggm/Escritorio/TFG/data/WISDM/plots/recurrence\_plots/sampling\_loto

I tried to install and reinstall datasets but didnt worked.

---

<div class="post-metadata">

**Author:** ![Adrianoggm](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Adrianoggm](https://discuss.huggingface.co/u/Adrianoggm)\
**Post date:** [May 7, 2024, 12:00pm UTC](https://discuss.huggingface.co/t/can-t-generate-my-own-dataset-using-load-dataset/85620/2 "2024-05-07T12:00:11Z")

</div>

the code clearer:

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/c/a/ca1b5e99bea28261f95ffd313060cf1623f5e711.png)
