How to Install TensorFlow on PyCharm?

TensorFlow is one of the most popular open-source libraries for machine learning and deep neural networks in Python—initiated by the machine learning engineers at Google! Problem Formulation: Given a PyCharm project. How to install the TensorFlow library in your project within a virtual environment or globally? Here’s a solution that always works: Open File > … Read more

How to Classify Star Wars Lego Images using CNN and Transfer Learning

This tutorial is about training deep learning (DL) models to classify Star Wars Lego images. We use the TensorFlow library to create and compare the image classifiers. Are you looking for interesting deep learning projects that are suitable for beginners? Do not worry, this is not another MNIST image classification tutorial. Instead, we are going … Read more

How to Get the Current Value of a Variable in TensorFlow?

Problem Formulation Given a TensorFlow variable created with tf.Variable(). As this variable may have changed during the training process (e.g., using assign()), you want to get the current value of it. How to accomplish this in TensorFlow? Sessions Are Gone in TensorFlow 2 In TensorFlow 1, computations were performed within Sessions. That’s why many people … Read more

How to Convert a Tensor to a NumPy Array in TensorFlow?

There are two ways to convert a Tensor to a NumPy array: TensorFlow version 2.x — use tensor.numpy() TensorFlow version 1.x — use tensor.eval(session=tf.compat.v1.Session()) Let’s dive into these two methods in greater detail. Method 1: Explicit Tensor to NumPy Array Conversion in TensorFlow 2.x To convert a tensor t to a NumPy array in TensorFlow … Read more

How to Check Your TensorFlow Version in Colab?

To check your TensorFlow version in your Jupyter Notebook such as Google’s Colab, use the following two commands: import tensorflow as tf This imports the TensorFlow library and stores it in the variable named tf. print(tf.__version__) This prints the installed TensorFlow version number in the format x.y.z. The following code example uses the dunder attribute … Read more

[Collection] 10 Tensorflow Cheat Sheets Every ML Engineer Must Download, Print, and Study

Have a little time to learn Tensorflow 2.0 with your Machine Learning? In this article, I have put together the 10 best Tensorflow cheat sheets for you to hang on the wall above your desk. Whenever you need a reference, keep these handy cheat sheets available!! Cheat Sheet 1: BecomingHuman.AI becominghuman.ai has multiple cheat sheets … Read more