Tuesday, April 18, 2023

Installing TensorFlow on Pop!_OS using Tensorman

Pop!_OS allows easy installation and management of Tensorflow using 'tensorman'.

Installing TensorFlow on Pop!_OS using Tensorman
Installing TensorFlow on Pop!_OS using Tensorman

First, make sure you have all the updates installed:

sudo apt update
sudo apt full-upgrade

Then, install the tensorman package:

sudo apt install tensorman

 In order to get Nvidia CUDA support, install the nvidia docker package:

sudo apt install nvidia-docker2

Thursday, October 8, 2020

Accuracy of Deep Learning Models Over the Years

Over the years, there were many achievements in deep learning, many of which were directly related to the ImageNet Large Scale Visual Recognition Challenge (ILSVRC, or ImageNet challenge for short). We talked about some of those milestones in deep learning in the past and how their unique innovations have helped shape the deep learning landscape today.

Today let us look at how the accuracy of these significant models has increased over the years.

Deep Learning Models Over the Years
Deep Learning Models Over the Years

When reporting the accuracy of classification models two accuracy measures are typically used: Top-1 Accuracy, and Top-5 Accuracy.
  • Top-1 Accuracy - Where the highest probability/confidence prediction from the model matches the expected class
  • Top-5 Accuracy - Where the expected class is within the top 5 predictions of the model

Thursday, October 1, 2020

Pre-orders are Now Open for Deep Learning on Windows

Pre-orders for my new book, Deep Learning on Windows, are Now Open at Amazon.com!

Deep Learning on Windows is my latest book, and it is the longest and the most comprehensive book I have written to date. The book is meant for both beginners and intermediates to deep learning. It covers topics from setting up your tools on Windows and getting started, to complex but fun topics in deep learning and computer vision.

The Cover of 'Deep Learning on Windows'
The Cover of 'Deep Learning on Windows'

The Windows OS accounts for over 70% of the desktop PC usage. Windows provides many conveniences, with a wide variety of available productivity tools, causing it to gather a large userbase. This means that there is a large percentage of you - AI enthusiasts and developers - out there that primarily work on the Windows OS, and would prefer to develop deep learning models on Windows itself.

Tuesday, September 22, 2020

Using model.fit() instead of fit_generator() with Data Generators - TF.Keras

If you have been using data generators in Keras, such as ImageDataGenerator for augment and load the input data, then you would be familiar with the using the *_generator() methods (fit_generator(), evaluate_generator(), etc.) to pass the generators when trainning the model. 

But recently, if you have switched to TensorFlow 2.1 or later (and tf.keras), you might have been getting a warning message such as,

Model.fit_generator (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.
Instructions for updating:
Please use Model.fit, which supports generators.


Model.evaluate_generator (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.
Instructions for updating:
Please use Model.evaluate, which supports generators.

fit_generator() Deprecation Warning
fit_generator() Deprecation Warning

This is because in tf.keras, as well as the latest version of multi-backend Keras, the model.fit() function can take generators as well. 

Wednesday, September 16, 2020

Major Update on My New Book: Deep Learning on Windows

If you recall, I originally intended to incrementally release my new book - Deep Learning on Windows – and have it completed around the June/July timeframe. Well, the month of July came and went, but no book got released. I also was not posting articles in the blog frequently for the past couple of months.

This was due to a major change in the plan for the book.

Deep Learning on Windows was picked up by a publisher!

The book will now be published under Apress, and it became a much larger offering than what I initially envisioned.

The new cover for the book is shown below:

New Cover for Deep Learning on Windows
New Cover for Deep Learning on Windows

On late-May, while I was working on the first drafts of the book on LeanPub, I was contacted by Apress on whether I would be interested in publishing the book under Apress banner. 

Sunday, May 10, 2020

Easy Text-to-Speech in Windows 10 Using PyWin32

Some time back, we've talked about how to build a speech recognition system in Python. Now let's look in to the other end of it: how to make a Python program that talks. More specifically, let's looks at building a text-to-speech system.

There are several libraries out there that would let you build a text-to-speech model: gTTS, tts_watson, Pyttsx, etc. But today, we'll be talking about using PyWin32 on Windows 10.

Windows 10 has a built-in speech engine, and you can access it through the PyWin32 library. As it uses the built-in system, it's quite efficient than other TTS methods on Windows, and does not require any external tools to playback the audio.

The PyWin32 library gets installed automatically if you're using Anaconda Python. If it's not installed, you can install it using either `conda install pywin32` or `pip install pywin32`.

Text-to-speech with PyWin32
Text-to-speech with PyWin32

Tuesday, April 21, 2020

Book Update: First 3 Chapters are Now Released!

I'm excited to let you know that the first 3 Chapters of my new book - Deep Learning on Windows - is now released at LeanPub!

Deep Learning on Windows - Cover
Deep Learning on Windows

This is currently the only book focusing specifically on setting up and developing Deep Learning models on Microsoft Windows. As I mentioned in my earlier post, most of the queries and questions I have received over the past year or so were related to building deep learning models on the Windows OS, and how-to setup and troubleshoot the tools on it. There were very little material out there addressing Windows specifically.

So, this book is my answer to that.

A total of 12 chapters are planned for the book, covering topics from setting up your tools on Windows, building your first models, to some advanced topics like transfer learning, deploying your models, computer vision, generative adversarial networks, and reinforcement learning.

The book will be released in an incremental manner. The first 3 chapters are now released.
Buying the book now guarantees that you will get all the remaining content, and all future updates and revisions for free as they get released.

The price of the book will increase over time as new chapters gets added, so purchasing early gives you the best value.