summaryrefslogtreecommitdiff
path: root/tutorials/custom-image-classifier-keras-tensorflow
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-01-04 15:33:34 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-01-04 15:33:34 +0530
commit562c929cd8b75d08d8ca368e0400c70188cd35a4 (patch)
tree32d870e52a450b7be84e1807d857eefdd941ca02 /tutorials/custom-image-classifier-keras-tensorflow
parent1bfaa7213ba53b1477085587a30675bb99a27c3e (diff)
Publish deploy 2020-01-04 15:33
Diffstat (limited to 'tutorials/custom-image-classifier-keras-tensorflow')
-rw-r--r--tutorials/custom-image-classifier-keras-tensorflow/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/tutorials/custom-image-classifier-keras-tensorflow/index.html b/tutorials/custom-image-classifier-keras-tensorflow/index.html
index 9ea32fe..c3518fd 100644
--- a/tutorials/custom-image-classifier-keras-tensorflow/index.html
+++ b/tutorials/custom-image-classifier-keras-tensorflow/index.html
@@ -1,4 +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/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
+<!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
@@ -58,7 +58,7 @@ 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",
+</code></pre><h3>Compiling Model</h3><p>We use the Adam optimizer 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 automatically 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))