From 3307f004b0b41e6d1b1f526f6f9f60204b5fa2fe Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 14 Jan 2020 23:14:54 +0530 Subject: Publish deploy 2020-01-14 23:14 --- posts/2019-12-08-Image-Classifier-Tensorflow/index.html | 2 +- posts/2019-12-08-Splitting-Zips/index.html | 2 +- posts/2019-12-10-TensorFlow-Model-Prediction/index.html | 2 +- posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html | 2 +- posts/2019-12-22-Fake-News-Detector/index.html | 2 +- posts/2020-01-14-Converting-between-PIL-NumPy/index.html | 2 +- posts/hello-world/index.html | 2 +- posts/index.html | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'posts') diff --git a/posts/2019-12-08-Image-Classifier-Tensorflow/index.html b/posts/2019-12-08-Image-Classifier-Tensorflow/index.html index 88c5e2e..a98de67 100644 --- a/posts/2019-12-08-Image-Classifier-Tensorflow/index.html +++ b/posts/2019-12-08-Image-Classifier-Tensorflow/index.html @@ -1,4 +1,4 @@ -Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria | Navan Chauhan
🕑 3 minute read.

Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria

Done during Google Code-In. Org: Tensorflow.

Imports

%tensorflow_version 2.x #This is for telling Colab that you want to use TF 2.0, ignore if running on local machine
+Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria | Navan Chauhan
🕑 3 minute read.

Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria

Done during Google Code-In. Org: Tensorflow.

Imports

%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
diff --git a/posts/2019-12-08-Splitting-Zips/index.html b/posts/2019-12-08-Splitting-Zips/index.html
index b5f2f5f..be90fa6 100644
--- a/posts/2019-12-08-Splitting-Zips/index.html
+++ b/posts/2019-12-08-Splitting-Zips/index.html
@@ -1,4 +1,4 @@
-Splitting ZIPs into Multiple Parts | Navan Chauhan
🕑 0 minute read.

Splitting ZIPs into Multiple Parts

Tested on macOS

Creating the archive:

zip -r -s 5 oodlesofnoodles.zip website/
+Splitting ZIPs into Multiple Parts | Navan Chauhan
🕑 0 minute read.

Splitting ZIPs into Multiple Parts

Tested on macOS

Creating the archive:

zip -r -s 5 oodlesofnoodles.zip website/
 

5 stands for each split files' size (in mb, kb and gb can also be specified)

For encrypting the zip:

zip -er -s 5 oodlesofnoodles.zip website
 

Extracting Files

First we need to collect all parts, then

zip -F oodlesofnoodles.zip --out merged.zip
 
Tagged with:
\ No newline at end of file diff --git a/posts/2019-12-10-TensorFlow-Model-Prediction/index.html b/posts/2019-12-10-TensorFlow-Model-Prediction/index.html index daab780..aa51948 100644 --- a/posts/2019-12-10-TensorFlow-Model-Prediction/index.html +++ b/posts/2019-12-10-TensorFlow-Model-Prediction/index.html @@ -1,4 +1,4 @@ -Making Predictions using Image Classifier (TensorFlow) | Navan Chauhan
🕑 1 minute read.

Making Predictions using Image Classifier (TensorFlow)

This was tested on TF 2.x and works as of 2019-12-10

If you want to understand how to make your own custom image classifier, please refer to my previous post.

If you followed my last post, then you created a model which took an image of dimensions 50x50 as an input.

First we import the following if we have not imported these before

import cv2
+Making Predictions using Image Classifier (TensorFlow) | Navan Chauhan
🕑 1 minute read.

Making Predictions using Image Classifier (TensorFlow)

This was tested on TF 2.x and works as of 2019-12-10

If you want to understand how to make your own custom image classifier, please refer to my previous post.

If you followed my last post, then you created a model which took an image of dimensions 50x50 as an input.

First we import the following if we have not imported these before

import cv2
 import os
 

Then we read the file using OpenCV.

image=cv2.imread(imagePath)
 

The cv2. imread() function returns a NumPy array representing the image. Therefore, we need to convert it before we can use it.

image_from_array = Image.fromarray(image, 'RGB')
diff --git a/posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html b/posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html
index b0399d4..37b0269 100644
--- a/posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html
+++ b/posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html
@@ -1,4 +1,4 @@
-Polynomial Regression Using TensorFlow | Navan Chauhan
🕑 15 minute read.

Polynomial Regression Using TensorFlow

In this tutorial you will learn about polynomial regression and how you can implement it in Tensorflow.

In this, we will be performing polynomial regression using 5 types of equations -

  • Linear
  • Quadratic
  • Cubic
  • Quartic
  • Quintic

Regression

What is Regression?

Regression is a statistical measurement that is used to try to determine the relationship between a dependent variable (often denoted by Y), and series of varying variables (called independent variables, often denoted by X ).

What is Polynomial Regression

This is a form of Regression Analysis where the relationship between Y and X is denoted as the nth degree/power of X. Polynomial regression even fits a non-linear relationship (e.g when the points don't form a straight line).

Imports

import tensorflow.compat.v1 as tf
+Polynomial Regression Using TensorFlow | Navan Chauhan
🕑 15 minute read.

Polynomial Regression Using TensorFlow

In this tutorial you will learn about polynomial regression and how you can implement it in Tensorflow.

In this, we will be performing polynomial regression using 5 types of equations -

  • Linear
  • Quadratic
  • Cubic
  • Quartic
  • Quintic

Regression

What is Regression?

Regression is a statistical measurement that is used to try to determine the relationship between a dependent variable (often denoted by Y), and series of varying variables (called independent variables, often denoted by X ).

What is Polynomial Regression

This is a form of Regression Analysis where the relationship between Y and X is denoted as the nth degree/power of X. Polynomial regression even fits a non-linear relationship (e.g when the points don't form a straight line).

Imports

import tensorflow.compat.v1 as tf
 tf.disable_v2_behavior()
 import matplotlib.pyplot as plt
 import numpy as np
diff --git a/posts/2019-12-22-Fake-News-Detector/index.html b/posts/2019-12-22-Fake-News-Detector/index.html
index 9492b95..6eb49ff 100644
--- a/posts/2019-12-22-Fake-News-Detector/index.html
+++ b/posts/2019-12-22-Fake-News-Detector/index.html
@@ -1,4 +1,4 @@
-Building a Fake News Detector with Turicreate | Navan Chauhan
🕑 6 minute read.

Building a Fake News Detector with Turicreate

In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app

Note: These commands are written as if you are running a jupyter notebook.

Building the Machine Learning Model

Data Gathering

To build a classifier, you need a lot of data. George McIntire (GH: @joolsa) has created a wonderful dataset containing the headline, body and wheter it is fake or real. Whenever you are looking for a dataset, always try searching on Kaggle and GitHub before you start building your own

Dependencies

I used a Google Colab instance for training my model. If you also plan on using Google Colab then I reccomend choosing a GPU Instance (It is Free) This allows you to train the model on the GPU. Turicreat is built on top of Apache's MXNet Framework, for us to use GPU we need to install a CUDA compatible MXNet package.

!pip install turicreate
+Building a Fake News Detector with Turicreate | Navan Chauhan
🕑 6 minute read.

Building a Fake News Detector with Turicreate

In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app

Note: These commands are written as if you are running a jupyter notebook.

Building the Machine Learning Model

Data Gathering

To build a classifier, you need a lot of data. George McIntire (GH: @joolsa) has created a wonderful dataset containing the headline, body and wheter it is fake or real. Whenever you are looking for a dataset, always try searching on Kaggle and GitHub before you start building your own

Dependencies

I used a Google Colab instance for training my model. If you also plan on using Google Colab then I reccomend choosing a GPU Instance (It is Free) This allows you to train the model on the GPU. Turicreat is built on top of Apache's MXNet Framework, for us to use GPU we need to install a CUDA compatible MXNet package.

!pip install turicreate
 !pip uninstall -y mxnet
 !pip install mxnet-cu100==1.4.0.post0
 

If you do not wish to train on GPU or are running it on your computer, you can ignore the last two lines

Downloading the Dataset

!wget -q "https://github.com/joolsa/fake_real_news_dataset/raw/master/fake_or_real_news.csv.zip"
diff --git a/posts/2020-01-14-Converting-between-PIL-NumPy/index.html b/posts/2020-01-14-Converting-between-PIL-NumPy/index.html
index fb685a2..6c885f1 100644
--- a/posts/2020-01-14-Converting-between-PIL-NumPy/index.html
+++ b/posts/2020-01-14-Converting-between-PIL-NumPy/index.html
@@ -1,4 +1,4 @@
-Converting between image and NumPy array | Navan Chauhan
🕑 0 minute read.

Converting between image and NumPy array

import numpy
+Converting between image and NumPy array | Navan Chauhan
🕑 0 minute read.

Converting between image and NumPy array

import numpy
 import PIL
 
 # Convert PIL Image to NumPy array
diff --git a/posts/hello-world/index.html b/posts/hello-world/index.html
index b3f8b29..48dc4a5 100644
--- a/posts/hello-world/index.html
+++ b/posts/hello-world/index.html
@@ -1 +1 @@
-Hello World | Navan Chauhan
🕑 0 minute read.

Hello World

Why a Hello World post?

Just re-did the entire website using Publish (Publish by John Sundell). So, a new hello world post :)

Tagged with:
\ No newline at end of file +Hello World | Navan Chauhan
🕑 0 minute read.

Hello World

Why a Hello World post?

Just re-did the entire website using Publish (Publish by John Sundell). So, a new hello world post :)

Tagged with:
\ No newline at end of file diff --git a/posts/index.html b/posts/index.html index 3ba5727..2fafc8c 100644 --- a/posts/index.html +++ b/posts/index.html @@ -1 +1 @@ -Posts | Navan Chauhan

Posts

Tips, tricks and tutorials which I think might be useful.

\ No newline at end of file +Posts | Navan Chauhan

Posts

Tips, tricks and tutorials which I think might be useful.

\ No newline at end of file -- cgit v1.2.3