{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"0aea6ec5-d9ff-ba57-6efc-9c4fed3c5263"},"outputs":[],"source":"# Rather than importing everything manually, we'll make things easy\n#   and load them all in utils.py, and just import them from there.\n%matplotlib inline\n\nfrom vgg16 import vgg16"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"86365618-2eb6-47d9-6383-c4b43227515c"},"outputs":[],"source":"from theano.sandbox import cuda\n"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"372d7e31-1dbc-393d-78e9-130abe7eb3ee"},"outputs":[],"source":"\n%matplotlib inline\nimport utils; reload(utils)\nfrom utils import *\nfrom __future__ import division, print_function"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"04c7d4ca-1cba-77a5-4fa9-f4baedb87aca"},"outputs":[],"source":"vgg = Vgg16()\n# Grab a few images at a time for training and validation.\n# NB: They must be in subdirectories named based on their category\nbatches = vgg.get_batches(path+'train', batch_size=batch_size)\nval_batches = vgg.get_batches(path+'valid', batch_size=batch_size*2)\nvgg.finetune(batches)\nvgg.fit(batches, val_batches, nb_epoch=1)"}],"metadata":{"_change_revision":0,"_is_fork":false,"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.6.0"}},"nbformat":4,"nbformat_minor":0}