text_plain_output_1.png
import cv2

import matplotlib.pyplot as plt

import os

import os

category = ['cat', 'dog']
EPOCHS = 50
IMGSIZE = 128
BATCH_SIZE = 32
STOPPING_PATIENCE = 15
VERBOSE = 1
MODEL_NAME = 'cnn_50epochs_imgsize128'
OPTIMIZER = 'adam'
TRAINING_DIR = '../input/dogs-vs-cats-redux-kernels-edition/train'
TEST_DIR = '../input/dogs-vs-cats-redux-kernels-edition/test'

for img in os.listdir(TRAINING_DIR)[7890:]:
    img_path = os.path.join(TRAINING_DIR, img)
    img_arr = cv2.imread(img_path, cv2.IMREAD_GRAYSCALE)
    img_arr = cv2.resize(img_arr, (IMGSIZE, IMGSIZE))
    plt.imshow(img_arr, cmap='gray')
    plt.title(img.split('.')[0])
    break