diff options
-rw-r--r-- | feed.rss | 104 | ||||
-rw-r--r-- | images/logo.png | bin | 0 -> 498 bytes | |||
-rw-r--r-- | index.html | 1 | ||||
-rw-r--r-- | posts/hello-world/index.html | 1 | ||||
-rw-r--r-- | posts/index.html | 1 | ||||
-rw-r--r-- | posts/splitting-zips/index.html | 4 | ||||
-rw-r--r-- | sitemap.xml | 1 | ||||
-rw-r--r-- | styles.css | 152 | ||||
-rw-r--r-- | tags/article/index.html | 1 | ||||
-rw-r--r-- | tags/codesnippet/index.html | 1 | ||||
-rw-r--r-- | tags/colab/index.html | 1 | ||||
-rw-r--r-- | tags/helloworld/index.html | 1 | ||||
-rw-r--r-- | tags/index.html | 1 | ||||
-rw-r--r-- | tags/tutorial/index.html | 1 | ||||
-rw-r--r-- | tutorials/custom-image-classifier-keras-tensorflow/index.html | 101 | ||||
-rw-r--r-- | tutorials/index.html | 1 |
16 files changed, 372 insertions, 0 deletions
diff --git a/feed.rss b/feed.rss new file mode 100644 index 0000000..b1159e5 --- /dev/null +++ b/feed.rss @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content"><channel><title>Navan Chauhan</title><description>I try to post tutorials, tips and tricks related to programming, designing and just some science stuff</description><link>https://navanchauhan.github.io/SwiftWebsite</link><language>en</language><lastBuildDate>Wed, 1 Jan 2020 19:10:36 +0530</lastBuildDate><pubDate>Wed, 1 Jan 2020 19:10:36 +0530</pubDate><ttl>250</ttl><atom:link href="https://navanchauhan.github.io/SwiftWebsite/feed.rss" rel="self" type="application/rss+xml"/><item><guid isPermaLink="true">https://navanchauhan.github.io/SwiftWebsite/posts/splitting-zips</guid><title>Splitting ZIPs into Multiple Parts</title><description>Short code snippet for splitting zips.</description><link>https://navanchauhan.github.io/SwiftWebsite/posts/splitting-zips</link><pubDate>Sun, 8 Dec 2019 13:27:00 +0530</pubDate><content:encoded><![CDATA[<h1>Splitting ZIPs into Multiple Parts</h1><p><strong>Tested on macOS</strong></p><p>Creating the archive:</p><pre><code>zip -r -s 5 oodlesofnoodles.zip website/ +</code></pre><p>5 stands for each split files' size (in mb, kb and gb can also be specified)</p><p>For encrypting the zip:</p><pre><code>zip -er -s 5 oodlesofnoodles.zip website +</code></pre><p>Extracting Files</p><p>First we need to collect all parts, then</p><pre><code>zip -F oodlesofnoodles.zip --out merged.zip +</code></pre>]]></content:encoded></item><item><guid isPermaLink="true">https://navanchauhan.github.io/SwiftWebsite/tutorials/custom-image-classifier-keras-tensorflow</guid><title>Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria</title><description>Short tutorial for creating a custom image classifier using TF 2.0</description><link>https://navanchauhan.github.io/SwiftWebsite/tutorials/custom-image-classifier-keras-tensorflow</link><pubDate>Sun, 8 Dec 2019 11:27:00 +0530</pubDate><content:encoded><![CDATA[<h1>Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria</h1><p><strong>Done during Google Code-In. Org: Tensorflow.</strong></p><h2>Imports</h2><pre><code>%tensorflow_version 2.x #This is for telling Colab that you want to use TF 2.0, ignore if running on local machine + +from PIL import Image # We use the PIL Library to resize images +import numpy as np +import os +import cv2 +import tensorflow as tf +from tensorflow.keras import datasets, layers, models +import pandas as pd +import matplotlib.pyplot as plt +from keras.models import Sequential +from keras.layers import Conv2D,MaxPooling2D,Dense,Flatten,Dropout +</code></pre><h2>Dataset</h2><h3>Fetching the Data</h3><pre><code>!wget ftp://lhcftp.nlm.nih.gov/Open-Access-Datasets/Malaria/cell_images.zip +!unzip cell_images.zip +</code></pre><h3>Processing the Data</h3><p>We resize all the images as 50x50 and add the numpy array of that image as well as their label names (Infected or Not) to common arrays.</p><pre><code>data = [] +labels = [] + +Parasitized = os.listdir("./cell_images/Parasitized/") +for parasite in Parasitized: + try: + image=cv2.imread("./cell_images/Parasitized/"+parasite) + image_from_array = Image.fromarray(image, 'RGB') + size_image = image_from_array.resize((50, 50)) + data.append(np.array(size_image)) + labels.append(0) + except AttributeError: + print("") + +Uninfected = os.listdir("./cell_images/Uninfected/") +for uninfect in Uninfected: + try: + image=cv2.imread("./cell_images/Uninfected/"+uninfect) + image_from_array = Image.fromarray(image, 'RGB') + size_image = image_from_array.resize((50, 50)) + data.append(np.array(size_image)) + labels.append(1) + except AttributeError: + print("") +</code></pre><h3>Splitting Data</h3><pre><code>df = np.array(data) +labels = np.array(labels) +(X_train, X_test) = df[(int)(0.1*len(df)):],df[:(int)(0.1*len(df))] +(y_train, y_test) = labels[(int)(0.1*len(labels)):],labels[:(int)(0.1*len(labels))] +</code></pre><pre><code>s=np.arange(X_train.shape[0]) +np.random.shuffle(s) +X_train=X_train[s] +y_train=y_train[s] +X_train = X_train/255.0 +</code></pre><h2>Model</h2><h3>Creating Model</h3><p>By creating a sequential model, we create a linear stack of layers.</p><p><em>Note: The input shape for the first layer is 50,50 which corresponds with the sizes of the resized images</em></p><pre><code>model = models.Sequential() +model.add(layers.Conv2D(filters=16, kernel_size=2, padding='same', activation='relu', input_shape=(50,50,3))) +model.add(layers.MaxPooling2D(pool_size=2)) +model.add(layers.Conv2D(filters=32,kernel_size=2,padding='same',activation='relu')) +model.add(layers.MaxPooling2D(pool_size=2)) +model.add(layers.Conv2D(filters=64,kernel_size=2,padding="same",activation="relu")) +model.add(layers.MaxPooling2D(pool_size=2)) +model.add(layers.Dropout(0.2)) +model.add(layers.Flatten()) +model.add(layers.Dense(500,activation="relu")) +model.add(layers.Dropout(0.2)) +model.add(layers.Dense(2,activation="softmax"))#2 represent output layer neurons +model.summary() +</code></pre><h3>Compiling Model</h3><p>We use the adam optimiser as it is an adaptive learning rate optimization algorithm that's been designed specifically for <em>training</em> deep neural networks, which means it changes its learning rate automaticaly to get the best results</p><pre><code>model.compile(optimizer="adam", + loss="sparse_categorical_crossentropy", + metrics=["accuracy"]) +</code></pre><h3>Training Model</h3><p>We train the model for 10 epochs on the training data and then validate it using the testing data</p><pre><code>history = model.fit(X_train,y_train, epochs=10, validation_data=(X_test,y_test)) +</code></pre><pre><code>Train on 24803 samples, validate on 2755 samples +Epoch 1/10 +24803/24803 [==============================] - 57s 2ms/sample - loss: 0.0786 - accuracy: 0.9729 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 2/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0746 - accuracy: 0.9731 - val_loss: 0.0290 - val_accuracy: 0.9996 +Epoch 3/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0672 - accuracy: 0.9764 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 4/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0601 - accuracy: 0.9789 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 5/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0558 - accuracy: 0.9804 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 6/10 +24803/24803 [==============================] - 57s 2ms/sample - loss: 0.0513 - accuracy: 0.9819 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 7/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0452 - accuracy: 0.9849 - val_loss: 0.3190 - val_accuracy: 0.9985 +Epoch 8/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0404 - accuracy: 0.9858 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 9/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0352 - accuracy: 0.9878 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 10/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0373 - accuracy: 0.9865 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +</code></pre><h3>Results</h3><pre><code>accuracy = history.history['accuracy'][-1]*100 +loss = history.history['loss'][-1]*100 +val_accuracy = history.history['val_accuracy'][-1]*100 +val_loss = history.history['val_loss'][-1]*100 + +print( + 'Accuracy:', accuracy, + '\nLoss:', loss, + '\nValidation Accuracy:', val_accuracy, + '\nValidation Loss:', val_loss +) +</code></pre><pre><code>Accuracy: 98.64532351493835 +Loss: 3.732407123270176 +Validation Accuracy: 100.0 +Validation Loss: 0.0 +</code></pre><p>We have achieved 98% Accuracy!</p><p><a href="https://colab.research.google.com/drive/1ZswDsxLwYZEnev89MzlL5Lwt6ut7iwp- "Colab Notebook"">Link to Colab Notebook</a></p>]]></content:encoded></item><item><guid isPermaLink="true">https://navanchauhan.github.io/SwiftWebsite/posts/hello-world</guid><title>Hello World</title><description>My first post.</description><link>https://navanchauhan.github.io/SwiftWebsite/posts/hello-world</link><pubDate>Tue, 16 Apr 2019 17:39:00 +0530</pubDate><content:encoded><![CDATA[<h1>Hello World</h1><p><strong>Why a Hello World post?</strong></p><p>Just re-did the entire website using Publish (Publish by John Sundell). So, a new hello world post :)</p>]]></content:encoded></item></channel></rss>
\ No newline at end of file diff --git a/images/logo.png b/images/logo.png Binary files differnew file mode 100644 index 0000000..caaf43c --- /dev/null +++ b/images/logo.png diff --git a/index.html b/index.html new file mode 100644 index 0000000..37f6df5 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite"/><title>Hi | Navan Chauhan</title><meta name="twitter:title" content="Hi | Navan Chauhan"/><meta name="og:title" content="Hi | Navan Chauhan"/><meta name="description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="og:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/posts">Posts</a></li><li><a href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><h1>Hi</h1><p class="description">I try to post tutorials, tips and tricks related to programming, designing and just some science stuff</p><h2>Latest content</h2><ul class="item-list"><li><article><h1><a href="/posts/splitting-zips">Splitting ZIPs into Multiple Parts</a></h1><ul class="tag-list"><li><a href="/tags/codesnippet">code-snippet</a></li><li><a href="/tags/article">article</a></li></ul><p>Short code snippet for splitting zips.</p></article></li><li><article><h1><a href="/tutorials/custom-image-classifier-keras-tensorflow">Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria</a></h1><ul class="tag-list"><li><a href="/tags/tutorial">tutorial</a></li><li><a href="/tags/colab">colab</a></li></ul><p>Short tutorial for creating a custom image classifier using TF 2.0</p></article></li><li><article><h1><a href="/posts/hello-world">Hello World</a></h1><ul class="tag-list"><li><a href="/tags/helloworld">hello-world</a></li><li><a href="/tags/article">article</a></li></ul><p>My first post.</p></article></li></ul></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/posts/hello-world/index.html b/posts/hello-world/index.html new file mode 100644 index 0000000..2b9572a --- /dev/null +++ b/posts/hello-world/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/posts/hello-world"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/posts/hello-world"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/posts/hello-world"/><title>Hello World | Navan Chauhan</title><meta name="twitter:title" content="Hello World | Navan Chauhan"/><meta name="og:title" content="Hello World | Navan Chauhan"/><meta name="description" content="My first post."/><meta name="twitter:description" content="My first post."/><meta name="og:description" content="My first post."/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body class="item-page"><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a class="selected" href="/posts">Posts</a></li><li><a href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><article><div class="content"><h1>Hello World</h1><p><strong>Why a Hello World post?</strong></p><p>Just re-did the entire website using Publish (Publish by John Sundell). So, a new hello world post :)</p></div><span>Tagged with: </span><ul class="tag-list"><li><a href="/tags/helloworld">hello-world</a></li><li><a href="/tags/article">article</a></li></ul></article></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/posts/index.html b/posts/index.html new file mode 100644 index 0000000..bb82402 --- /dev/null +++ b/posts/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/posts"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/posts"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/posts"/><title>Posts | Navan Chauhan</title><meta name="twitter:title" content="Posts | Navan Chauhan"/><meta name="og:title" content="Posts | Navan Chauhan"/><meta name="description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="og:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a class="selected" href="/posts">Posts</a></li><li><a href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><h1>Posts</h1><ul class="item-list"><li><article><h1><a href="/posts/splitting-zips">Splitting ZIPs into Multiple Parts</a></h1><ul class="tag-list"><li><a href="/tags/codesnippet">code-snippet</a></li><li><a href="/tags/article">article</a></li></ul><p>Short code snippet for splitting zips.</p></article></li><li><article><h1><a href="/posts/hello-world">Hello World</a></h1><ul class="tag-list"><li><a href="/tags/helloworld">hello-world</a></li><li><a href="/tags/article">article</a></li></ul><p>My first post.</p></article></li></ul></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/posts/splitting-zips/index.html b/posts/splitting-zips/index.html new file mode 100644 index 0000000..b65d420 --- /dev/null +++ b/posts/splitting-zips/index.html @@ -0,0 +1,4 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/posts/splitting-zips"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/posts/splitting-zips"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/posts/splitting-zips"/><title>Splitting ZIPs into Multiple Parts | Navan Chauhan</title><meta name="twitter:title" content="Splitting ZIPs into Multiple Parts | Navan Chauhan"/><meta name="og:title" content="Splitting ZIPs into Multiple Parts | Navan Chauhan"/><meta name="description" content="Short code snippet for splitting zips."/><meta name="twitter:description" content="Short code snippet for splitting zips."/><meta name="og:description" content="Short code snippet for splitting zips."/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body class="item-page"><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a class="selected" href="/posts">Posts</a></li><li><a href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><article><div class="content"><h1>Splitting ZIPs into Multiple Parts</h1><p><strong>Tested on macOS</strong></p><p>Creating the archive:</p><pre><code>zip -r -s 5 oodlesofnoodles.zip website/ +</code></pre><p>5 stands for each split files' size (in mb, kb and gb can also be specified)</p><p>For encrypting the zip:</p><pre><code>zip -er -s 5 oodlesofnoodles.zip website +</code></pre><p>Extracting Files</p><p>First we need to collect all parts, then</p><pre><code>zip -F oodlesofnoodles.zip --out merged.zip +</code></pre></div><span>Tagged with: </span><ul class="tag-list"><li><a href="/tags/codesnippet">code-snippet</a></li><li><a href="/tags/article">article</a></li></ul></article></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..d1c8cbc --- /dev/null +++ b/sitemap.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"><url><loc>https://navanchauhan.github.io/SwiftWebsite/posts</loc><changefreq>daily</changefreq><priority>1.0</priority><lastmod>2020-01-01</lastmod></url><url><loc>https://navanchauhan.github.io/SwiftWebsite/posts/splitting-zips</loc><changefreq>monthly</changefreq><priority>0.5</priority><lastmod>2020-01-01</lastmod></url><url><loc>https://navanchauhan.github.io/SwiftWebsite/posts/hello-world</loc><changefreq>monthly</changefreq><priority>0.5</priority><lastmod>2020-01-01</lastmod></url><url><loc>https://navanchauhan.github.io/SwiftWebsite/tutorials</loc><changefreq>daily</changefreq><priority>1.0</priority><lastmod>2020-01-01</lastmod></url><url><loc>https://navanchauhan.github.io/SwiftWebsite/tutorials/custom-image-classifier-keras-tensorflow</loc><changefreq>monthly</changefreq><priority>0.5</priority><lastmod>2020-01-01</lastmod></url></urlset>
\ No newline at end of file diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..0422af4 --- /dev/null +++ b/styles.css @@ -0,0 +1,152 @@ +/** +* Publish Foundation theme +* Copyright (c) John Sundell 2019 +* MIT license, see LICENSE file for details +*/ + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + background: #fff; + color: #000; + font-family: Helvetica, Arial; + text-align: center; +} + +.wrapper { + max-width: 900px; + margin-left: auto; + margin-right: auto; + padding: 40px; + text-align: left; +} + +header { + background-color: #eee; +} + +header .wrapper { + padding-top: 30px; + padding-bottom: 30px; + text-align: center; +} + +header a { + text-decoration: none; +} + +header .site-name { + font-size: 1.5em; + color: #000; + font-weight: bold; +} + +nav { + margin-top: 20px; +} + +nav li { + display: inline-block; +} + +h1 { + margin-bottom: 20px; + font-size: 2em; +} + +h2 { + margin: 20px 0; +} + +p { + margin-bottom: 10px; +} + +a { + color: inherit; +} + +.description { + margin-bottom: 40px; +} + +.item-list > li { + display: block; + padding: 20px; + border-radius: 20px; + background-color: #eee; +} + +.item-list h1 { + margin-bottom: 15px; + font-size: 1.3em; +} + +.item-list p { + margin-bottom: 0; +} + +.tag-list { + margin-bottom: 15px; +} + +.tag-list li, +.tag { + display: inline-block; + background-color: #000; + color: #ddd; + padding: 4px 6px; + border-radius: 5px; + margin-right: 5px; +} + +.tag-list a, +.tag a { + text-decoration: none; +} + +.item-page .tag-list { + display: inline-block; +} + +.content { + margin-bottom: 40px; +} + +.browse-all { + display: block; + margin-bottom: 30px; +} + +.all-tags li { + font-size: 1.4em; + margin-right: 10px; + padding: 6px 10px; +} + +footer { + color: #8a8a8a; +} + +@media (prefers-color-scheme: dark) { + body { + background-color: #222; + } + + body, + header .site-name { + color: #ddd; + } + + .item-list > li { + background-color: #333; + } + + header { + background-color: #000; + } +} diff --git a/tags/article/index.html b/tags/article/index.html new file mode 100644 index 0000000..62b57ff --- /dev/null +++ b/tags/article/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/tags/article"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/tags/article"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/tags/article"/><title>Navan Chauhan</title><meta name="twitter:title" content="Navan Chauhan"/><meta name="og:title" content="Navan Chauhan"/><meta name="description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="og:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/posts">Posts</a></li><li><a href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><h1>Tagged with <span class="tag">article</span></h1><a class="browse-all" href="/tags">Browse all tags</a><ul class="item-list"><li><article><h1><a href="/posts/splitting-zips">Splitting ZIPs into Multiple Parts</a></h1><ul class="tag-list"><li><a href="/tags/codesnippet">code-snippet</a></li><li><a href="/tags/article">article</a></li></ul><p>Short code snippet for splitting zips.</p></article></li><li><article><h1><a href="/posts/hello-world">Hello World</a></h1><ul class="tag-list"><li><a href="/tags/helloworld">hello-world</a></li><li><a href="/tags/article">article</a></li></ul><p>My first post.</p></article></li></ul></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/tags/codesnippet/index.html b/tags/codesnippet/index.html new file mode 100644 index 0000000..06af971 --- /dev/null +++ b/tags/codesnippet/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/tags/codesnippet"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/tags/codesnippet"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/tags/codesnippet"/><title>Navan Chauhan</title><meta name="twitter:title" content="Navan Chauhan"/><meta name="og:title" content="Navan Chauhan"/><meta name="description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="og:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/posts">Posts</a></li><li><a href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><h1>Tagged with <span class="tag">code-snippet</span></h1><a class="browse-all" href="/tags">Browse all tags</a><ul class="item-list"><li><article><h1><a href="/posts/splitting-zips">Splitting ZIPs into Multiple Parts</a></h1><ul class="tag-list"><li><a href="/tags/codesnippet">code-snippet</a></li><li><a href="/tags/article">article</a></li></ul><p>Short code snippet for splitting zips.</p></article></li></ul></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/tags/colab/index.html b/tags/colab/index.html new file mode 100644 index 0000000..50170e8 --- /dev/null +++ b/tags/colab/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/tags/colab"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/tags/colab"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/tags/colab"/><title>Navan Chauhan</title><meta name="twitter:title" content="Navan Chauhan"/><meta name="og:title" content="Navan Chauhan"/><meta name="description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="og:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/posts">Posts</a></li><li><a href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><h1>Tagged with <span class="tag">colab</span></h1><a class="browse-all" href="/tags">Browse all tags</a><ul class="item-list"><li><article><h1><a href="/tutorials/custom-image-classifier-keras-tensorflow">Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria</a></h1><ul class="tag-list"><li><a href="/tags/tutorial">tutorial</a></li><li><a href="/tags/colab">colab</a></li></ul><p>Short tutorial for creating a custom image classifier using TF 2.0</p></article></li></ul></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/tags/helloworld/index.html b/tags/helloworld/index.html new file mode 100644 index 0000000..add0b1f --- /dev/null +++ b/tags/helloworld/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/tags/helloworld"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/tags/helloworld"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/tags/helloworld"/><title>Navan Chauhan</title><meta name="twitter:title" content="Navan Chauhan"/><meta name="og:title" content="Navan Chauhan"/><meta name="description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="og:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/posts">Posts</a></li><li><a href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><h1>Tagged with <span class="tag">hello-world</span></h1><a class="browse-all" href="/tags">Browse all tags</a><ul class="item-list"><li><article><h1><a href="/posts/hello-world">Hello World</a></h1><ul class="tag-list"><li><a href="/tags/helloworld">hello-world</a></li><li><a href="/tags/article">article</a></li></ul><p>My first post.</p></article></li></ul></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/tags/index.html b/tags/index.html new file mode 100644 index 0000000..92ab3f5 --- /dev/null +++ b/tags/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/tags"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/tags"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/tags"/><title>Navan Chauhan</title><meta name="twitter:title" content="Navan Chauhan"/><meta name="og:title" content="Navan Chauhan"/><meta name="description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="og:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/posts">Posts</a></li><li><a href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><h1>Browse all tags</h1><ul class="all-tags"><li class="tag"><a href="/tags/article">article</a></li><li class="tag"><a href="/tags/codesnippet">code-snippet</a></li><li class="tag"><a href="/tags/colab">colab</a></li><li class="tag"><a href="/tags/helloworld">hello-world</a></li><li class="tag"><a href="/tags/tutorial">tutorial</a></li></ul></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/tags/tutorial/index.html b/tags/tutorial/index.html new file mode 100644 index 0000000..aad1353 --- /dev/null +++ b/tags/tutorial/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/tags/tutorial"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/tags/tutorial"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/tags/tutorial"/><title>Navan Chauhan</title><meta name="twitter:title" content="Navan Chauhan"/><meta name="og:title" content="Navan Chauhan"/><meta name="description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="og:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/posts">Posts</a></li><li><a href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><h1>Tagged with <span class="tag">tutorial</span></h1><a class="browse-all" href="/tags">Browse all tags</a><ul class="item-list"><li><article><h1><a href="/tutorials/custom-image-classifier-keras-tensorflow">Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria</a></h1><ul class="tag-list"><li><a href="/tags/tutorial">tutorial</a></li><li><a href="/tags/colab">colab</a></li></ul><p>Short tutorial for creating a custom image classifier using TF 2.0</p></article></li></ul></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/tutorials/custom-image-classifier-keras-tensorflow/index.html b/tutorials/custom-image-classifier-keras-tensorflow/index.html new file mode 100644 index 0000000..6746e29 --- /dev/null +++ b/tutorials/custom-image-classifier-keras-tensorflow/index.html @@ -0,0 +1,101 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/tutorials/custom-image-classifier-keras-tensorflow"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/tutorials/custom-image-classifier-keras-tensorflow"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/tutorials/custom-image-classifier-keras-tensorflow"/><title>Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria | Navan Chauhan</title><meta name="twitter:title" content="Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria | Navan Chauhan"/><meta name="og:title" content="Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria | Navan Chauhan"/><meta name="description" content="Short tutorial for creating a custom image classifier using TF 2.0"/><meta name="twitter:description" content="Short tutorial for creating a custom image classifier using TF 2.0"/><meta name="og:description" content="Short tutorial for creating a custom image classifier using TF 2.0"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body class="item-page"><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/posts">Posts</a></li><li><a class="selected" href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><article><div class="content"><h1>Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria</h1><p><strong>Done during Google Code-In. Org: Tensorflow.</strong></p><h2>Imports</h2><pre><code>%tensorflow_version 2.x #This is for telling Colab that you want to use TF 2.0, ignore if running on local machine + +from PIL import Image # We use the PIL Library to resize images +import numpy as np +import os +import cv2 +import tensorflow as tf +from tensorflow.keras import datasets, layers, models +import pandas as pd +import matplotlib.pyplot as plt +from keras.models import Sequential +from keras.layers import Conv2D,MaxPooling2D,Dense,Flatten,Dropout +</code></pre><h2>Dataset</h2><h3>Fetching the Data</h3><pre><code>!wget ftp://lhcftp.nlm.nih.gov/Open-Access-Datasets/Malaria/cell_images.zip +!unzip cell_images.zip +</code></pre><h3>Processing the Data</h3><p>We resize all the images as 50x50 and add the numpy array of that image as well as their label names (Infected or Not) to common arrays.</p><pre><code>data = [] +labels = [] + +Parasitized = os.listdir("./cell_images/Parasitized/") +for parasite in Parasitized: + try: + image=cv2.imread("./cell_images/Parasitized/"+parasite) + image_from_array = Image.fromarray(image, 'RGB') + size_image = image_from_array.resize((50, 50)) + data.append(np.array(size_image)) + labels.append(0) + except AttributeError: + print("") + +Uninfected = os.listdir("./cell_images/Uninfected/") +for uninfect in Uninfected: + try: + image=cv2.imread("./cell_images/Uninfected/"+uninfect) + image_from_array = Image.fromarray(image, 'RGB') + size_image = image_from_array.resize((50, 50)) + data.append(np.array(size_image)) + labels.append(1) + except AttributeError: + print("") +</code></pre><h3>Splitting Data</h3><pre><code>df = np.array(data) +labels = np.array(labels) +(X_train, X_test) = df[(int)(0.1*len(df)):],df[:(int)(0.1*len(df))] +(y_train, y_test) = labels[(int)(0.1*len(labels)):],labels[:(int)(0.1*len(labels))] +</code></pre><pre><code>s=np.arange(X_train.shape[0]) +np.random.shuffle(s) +X_train=X_train[s] +y_train=y_train[s] +X_train = X_train/255.0 +</code></pre><h2>Model</h2><h3>Creating Model</h3><p>By creating a sequential model, we create a linear stack of layers.</p><p><em>Note: The input shape for the first layer is 50,50 which corresponds with the sizes of the resized images</em></p><pre><code>model = models.Sequential() +model.add(layers.Conv2D(filters=16, kernel_size=2, padding='same', activation='relu', input_shape=(50,50,3))) +model.add(layers.MaxPooling2D(pool_size=2)) +model.add(layers.Conv2D(filters=32,kernel_size=2,padding='same',activation='relu')) +model.add(layers.MaxPooling2D(pool_size=2)) +model.add(layers.Conv2D(filters=64,kernel_size=2,padding="same",activation="relu")) +model.add(layers.MaxPooling2D(pool_size=2)) +model.add(layers.Dropout(0.2)) +model.add(layers.Flatten()) +model.add(layers.Dense(500,activation="relu")) +model.add(layers.Dropout(0.2)) +model.add(layers.Dense(2,activation="softmax"))#2 represent output layer neurons +model.summary() +</code></pre><h3>Compiling Model</h3><p>We use the adam optimiser as it is an adaptive learning rate optimization algorithm that's been designed specifically for <em>training</em> deep neural networks, which means it changes its learning rate automaticaly to get the best results</p><pre><code>model.compile(optimizer="adam", + loss="sparse_categorical_crossentropy", + metrics=["accuracy"]) +</code></pre><h3>Training Model</h3><p>We train the model for 10 epochs on the training data and then validate it using the testing data</p><pre><code>history = model.fit(X_train,y_train, epochs=10, validation_data=(X_test,y_test)) +</code></pre><pre><code>Train on 24803 samples, validate on 2755 samples +Epoch 1/10 +24803/24803 [==============================] - 57s 2ms/sample - loss: 0.0786 - accuracy: 0.9729 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 2/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0746 - accuracy: 0.9731 - val_loss: 0.0290 - val_accuracy: 0.9996 +Epoch 3/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0672 - accuracy: 0.9764 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 4/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0601 - accuracy: 0.9789 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 5/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0558 - accuracy: 0.9804 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 6/10 +24803/24803 [==============================] - 57s 2ms/sample - loss: 0.0513 - accuracy: 0.9819 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 7/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0452 - accuracy: 0.9849 - val_loss: 0.3190 - val_accuracy: 0.9985 +Epoch 8/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0404 - accuracy: 0.9858 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 9/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0352 - accuracy: 0.9878 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +Epoch 10/10 +24803/24803 [==============================] - 58s 2ms/sample - loss: 0.0373 - accuracy: 0.9865 - val_loss: 0.0000e+00 - val_accuracy: 1.0000 +</code></pre><h3>Results</h3><pre><code>accuracy = history.history['accuracy'][-1]*100 +loss = history.history['loss'][-1]*100 +val_accuracy = history.history['val_accuracy'][-1]*100 +val_loss = history.history['val_loss'][-1]*100 + +print( + 'Accuracy:', accuracy, + '\nLoss:', loss, + '\nValidation Accuracy:', val_accuracy, + '\nValidation Loss:', val_loss +) +</code></pre><pre><code>Accuracy: 98.64532351493835 +Loss: 3.732407123270176 +Validation Accuracy: 100.0 +Validation Loss: 0.0 +</code></pre><p>We have achieved 98% Accuracy!</p><p><a href="https://colab.research.google.com/drive/1ZswDsxLwYZEnev89MzlL5Lwt6ut7iwp- "Colab Notebook"">Link to Colab Notebook</a></p></div><span>Tagged with: </span><ul class="tag-list"><li><a href="/tags/tutorial">tutorial</a></li><li><a href="/tags/colab">colab</a></li></ul></article></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file diff --git a/tutorials/index.html b/tutorials/index.html new file mode 100644 index 0000000..dc7f9b4 --- /dev/null +++ b/tutorials/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/SwiftWebsite/tutorials"/><meta name="twitter:url" content="https://navanchauhan.github.io/SwiftWebsite/tutorials"/><meta name="og:url" content="https://navanchauhan.github.io/SwiftWebsite/tutorials"/><title>Tutorials | Navan Chauhan</title><meta name="twitter:title" content="Tutorials | Navan Chauhan"/><meta name="og:title" content="Tutorials | Navan Chauhan"/><meta name="description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="og:description" content="I try to post tutorials, tips and tricks related to programming, designing and just some science stuff"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/SwiftWebsite/images/logo.png"/></head><body><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/posts">Posts</a></li><li><a class="selected" href="/tutorials">Tutorials</a></li></ul></nav></div></header><div class="wrapper"><h1>Tutorials</h1><ul class="item-list"><li><article><h1><a href="/tutorials/custom-image-classifier-keras-tensorflow">Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria</a></h1><ul class="tag-list"><li><a href="/tags/tutorial">tutorial</a></li><li><a href="/tags/colab">colab</a></li></ul><p>Short tutorial for creating a custom image classifier using TF 2.0</p></article></li></ul></div><footer><p>Generated using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>
\ No newline at end of file |