def foo(bar):
return bar * 2
To your question: Assuming that the line starting with =r"\C...
refers to the file path, that file path should probably not end in ...\conv neural I\cats\
and just end in ...\conv neural I\
. I believe this because the error states that the file you are trying to look up in the loop ends with \cats\\/cats
, i.e. one \\cats
too many.
ok thank you very much for reply
i exctracted the folder from zip and i get a better path :
C:\Users\moi\Downloads\PARENT_ FOLDER\1577957291_deeplearningwithkerasandtensorflow (5)\data\test\cats
but with :
File “”, line 1
DIRECTORY =r"\C:\Users\moi\Downloads\PARENT_FOLDER\1577957291_deeplearningwithkerasandtensorflow (5)\data\test\cats
SyntaxError: EOL while scanning string literal
thank you vm
another try :
DIRECTORY =r"\C:\Users\moi\Downloads\PARENT_FOLDER\1577957291_deeplearningwithkerasandtensorflow (5)\data\test\cats"
i get a worst error :
FileNotFoundError Traceback (most recent call last)
1 for categorie in CATEGORIES :
2 folder = os.path.join( DIRECTORY , categorie )
----> 3 for img in os.listdir(folder):
4 img_path = os.path.join (folder,img )
5 img_arr = cv2.imread(img_path )
FileNotFoundError: [Errno 2] No such file or directory: ‘\\C:\\Users\\moi\\Downloads\\PARENT_FOLDER\\1577957291_deeplearningwithkerasandtensorflow (5)\\data\\test\\cats/cats’
another try :
DIRECTORY =r’\C:\Users\moi\Downloads\PARENT_FOLDER\1577957291_deeplearningwithkerasandtensorflow (5)\data\test\cats\’
FileNotFoundError Traceback (most recent call last)
1 for categorie in CATEGORIES :
2 folder = os.path.join( DIRECTORY , categorie )
----> 3 for img in os.listdir(folder):
4 img_path = os.path.join (folder,img )
5 img_arr = cv2.imread(img_path )
FileNotFoundError: [Errno 2] No such file or directory: ‘\\C:\\Users\\moi\\Downloads\\PARENT_FOLDER\\1577957291_deeplearningwithkerasandtensorflow (5)\\data\\test\\cats\\/cats’
i m going sad …i don t understand anything