{"cells":[{"metadata":{},"cell_type":"markdown","source":"Please leave your sugestions below. Please upvote it if you find it useful and to show your support too. Thanks. 👍"},{"metadata":{},"cell_type":"markdown","source":"I plan to write a code explanation for this and train the model further to improve the accuracy of the model."},{"metadata":{},"cell_type":"markdown","source":"I have used the latest Fastai(Fastai version 2 library) to train the model and make predictions on test set."},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"import fastai\nfrom fastai.vision.all import *","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"# Defining data path\nIMAGE_PATH = \"../input/siim-isic-melanoma-classification/\"\nimgpath = IMAGE_PATH+'/jpeg/train'\n\ndf = pd.read_csv('../input/siim-isic-melanoma-classification/train.csv')\n#test=pd.read_csv('../input/tweet-sentiment-extraction/test.csv')\ndf.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"dls = ImageDataLoaders.from_df(df, path=imgpath,valid_pct=0.2, seed=42, fn_col=0, folder=None, suff='.jpg', label_col=7, label_delim=None, y_block=None, valid_col=None, item_tfms=Resize(128), batch_tfms=aug_transforms(flip_vert=True, max_warp=0.), bs=128, val_bs=None, shuffle_train=True)\ndls.show_batch()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"dls.device","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"learn = cnn_learner(dls, resnet34, metrics=error_rate, model_dir=\"/tmp/model/\")\nlearn.fit_one_cycle(1, 1e-2)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"learn.lr_find()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"learn.fine_tune(1)","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}