An error is occuring

for f in folders:
path = " sample_data/"+f
print(f+ " "+ str(len(os.listdir(path))))


FileNotFoundError Traceback (most recent call last)
in ()
1 for f in folders:
2 path = " sample_data/"+f
----> 3 print(f+ " "+ str(len(os.listdir(path))))

FileNotFoundError: [Errno 2] No such file or directory: ’ sample_data/horses’

this is the colab notebook i am attaching for you

https://colab.research.google.com/drive/1gPvaw6oby_ha2n0OxKZNbk-CVlrzISHa?usp=sharing

hey @Aashi-Agarwal-2380268668952871 ,
its a path error.
Kindly correct that path to work.

This should be path = "New folder/"+f
I hope this helps.

hey @Aashi-Agarwal-2380268668952871 ,
is there anything you wanted to tell ? or clear out something?

1 Like

no and thanks prashant_ml

YES PLZ LOOK INTO AGAIN MY TRAIN FUNCTION IS SHOWING ERROR

What error are you getting now.

#train our model#

history = model.fit_generator(

train_generator,

steps_per_epoch = 7,

epochs = 20

)

InvalidArgumentError: logits and labels must be broadcastable: logits_size=[32,10] labels_size=[32,4]
[[node categorical_crossentropy/softmax_cross_entropy_with_logits (defined at :6) ]] [Op:__inference_train_function_988]

Function call stack:
train_function

i am attaching my google colab also.
https://colab.research.google.com/drive/1gPvaw6oby_ha2n0OxKZNbk-CVlrzISHa?usp=sharing

hey @Aashi-Agarwal-2380268668952871 ,
I guess i have messaged about this same doubt in other discussion forum.

So i would request you to kindly mark this one as resolved.
Thank You and Happy Learning :slightly_smiling_face:.