{"cells":[{"metadata":{},"cell_type":"markdown","source":"# Triple Stratified KFold CV with TFRecords\nThis is a simple starter notebook for Kaggle's Melanoma Comp showing triple stratifed KFold with TFRecords. Triple stratified KFold is explained [here][2]. There are many configuration variables below to allow you to experiment. Use either GPU or TPU. You can control which size images are loaded, which efficientNets are used, and whether external data is used. You can experiment with different data augmentation, model architecture, loss, optimizers, and learning schedules. The TFRecords contain meta data, so you can input that into your CNN too. \n\n**NOTE:** this notebook lets you run a different experiment in each fold if you want to run lots of experiments. (Then it is like running multiple holdout validaiton experiments but in that case note that the overall CV score is meaningless because LB will be much higher when the multiple experiments are ensembled to predict test). **If you want a proper CV with a reliable overall CV score you need to choose the same configuration for each fold.**\n\nThis notebook follows the 5 step process presented in my \"How to compete with GPUs Workshop\" [here][1]. Some code sections have been reused from AgentAuers' great notebook [here][3]\n\n[1]: https://www.kaggle.com/cdeotte/how-to-compete-with-gpus-workshop\n[2]: https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/165526\n[3]: https://www.kaggle.com/agentauers/incredible-tpus-finetune-effnetb0-b6-at-once","execution_count":null},{"metadata":{},"cell_type":"markdown","source":"# Kaggle's SIIM-ISIC Melanoma Classification\nIn this competition, we need to identify melanoma in images of skin lesions. Full description [here][1]. This is a very challenging image classification task as seen by looking at the sample images below. Can you recognize the differences between images? Below are example of skin images with and without melanoma.\n\n[1]: https://www.kaggle.com/c/siim-isic-melanoma-classification","execution_count":null},{"metadata":{"trusted":true},"cell_type":"code","source":"!ls ../input/melanoma-512x512/ | wc -l ","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"!cp ../input/melanoma-512x512/train00-2182.tfrec ./fold_1_00-2182.tfrec\n!cp ../input/melanoma-512x512/train01-2185.tfrec ./fold_1_01-2185.tfrec\n!cp ../input/melanoma-512x512/train02-2193.tfrec ./fold_1_02-2193.tfrec\n\n!cp ../input/melanoma-512x512/train03-2182.tfrec ./fold_2_00-2182.tfrec\n!cp ../input/melanoma-512x512/train04-2167.tfrec ./fold_2_01-2167.tfrec\n!cp ../input/melanoma-512x512/train05-2171.tfrec ./fold_2_02-2171.tfrec\n\n!cp ../input/melanoma-512x512/train06-2175.tfrec ./fold_3_00-2175.tfrec\n!cp ../input/melanoma-512x512/train07-2174.tfrec ./fold_3_01-2174.tfrec\n!cp ../input/melanoma-512x512/train08-2177.tfrec ./fold_3_02-2177.tfrec\n\n!cp ../input/melanoma-512x512/train09-2178.tfrec ./fold_4_00-2178.tfrec\n!cp ../input/melanoma-512x512/train10-2174.tfrec ./fold_4_01-2174.tfrec\n!cp ../input/melanoma-512x512/train11-2176.tfrec ./fold_4_02-2176.tfrec\n\n!cp ../input/melanoma-512x512/train12-2198.tfrec ./fold_5_00-2198.tfrec\n!cp ../input/melanoma-512x512/train13-2186.tfrec ./fold_5_01-2186.tfrec\n!cp ../input/melanoma-512x512/train14-2174.tfrec ./fold_5_02-2174.tfrec\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"!pwd","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat":4,"nbformat_minor":4}