I have used the dataset of cats vs dogs to train my logistic regression model but I am getting wrong output (I don’t know the implementation of CNN so I used logistic regression). Please review my code. If there is any error please tell me else give me suggestions to improve code and style.
Sorry for the late reply, but the code is giving 0 for dog and 1 for cat which is opposite of what it should be. I am not able to understand if there is some logic error in code or I am understanding it incorrectly or is Logistic Regression not great with images.
Thank you for your help! Apparently the images were not loading properly and thus the output was not correct. I changed the pictures and tested on 200 new cat images and the model got around 60% correct labels and around 64 % on 200 dog images. It was totally my mistake for not checking if the images were loading properly.