Python猫狗图片分类:数据准备与路径设置
The variables 'cat_path' and 'dog_path' should contain the paths to the directories where the cat and dog images are stored, respectively. You need to specify the correct paths to these directories on your system. For example, if your images are stored in a folder named 'catsdogs' on your desktop, and within that folder there are subfolders named 'Cat' and 'Dog' containing the cat and dog images respectively, you would set:
cat_path = 'C:/Users/YourUserName/Desktop/catsdogs/Cat'
dog_path = 'C:/Users/YourUserName/Desktop/catsdogs/Dog'
Replace 'YourUserName' with your actual user name. Make sure to adjust the paths according to the actual location of your image files on your computer.
原文地址: https://www.cveoy.top/t/topic/o9u2 著作权归作者所有。请勿转载和采集!