%matplotlib inline

"""
Explanation: Dogs vs Cats with vgg16
Setup
End of explanation
"""


#path = "data/dogscats/"
path = "data/dogscats/sample/"

from __future__ import division, print_function
import os, json
from glob import glob
import numpy as np
np.set_printoptions(precision=4, linewidth=100)
from matplotlib import pyplot as plt

import utils; reload(utils)
from utils import plots

"""
Explanation: Path to training and test data
End of explanation
"""


import vgg16; reload(vgg16)
from vgg16 import Vgg16

vgg = Vgg16()

batch_size = 64

batches = vgg.get_batches(path + "train", batch_size=batch_size)
val_batches = vgg.get_batches(path + "valid", batch_size=batch_size)

"""
Explanation: Vgg16 for basic image recognition
End of explanation
"""


vgg.finetune(batches)

"""
Explanation: finetune() modifies the model so that it will be trained based on the batched data provided (cat or dog)
End of explanation
"""


vgg.fit(batches, val_batches, nb_epoch=1)

"""
Explanation: fit() the parameters of the model using the training data
End of explanation
"""


