## Tensorflow 2 – How to Reverse a Tensor

The examples below show you a couple of different ways to reverse a tensor in Tensorflow 2. Using the tf.reverse() function The tf.reverse() function can be used to flip specific dimensions of a tensor. Example: Output:…

## Tensorflow 2 – How to Print only the Value of a Tensor

This concise post shows you 2 ways to print only the value of a tensor in Tensorflow 2. Using the tf.print() function Example: Output: Using the print() function will result in the following: Reference: https://www.tensorflow.org/api_docs/python/tf/print Using…

## Tensorflow 2 – Aggregation Operators on Tensors

In simple words, aggregating means condensing the from multiple values down to a smaller amount of values. You can find a more formal definition in the Cambridge dictionary or Merriam Webster dictionary. This article shows you…

## Tensorflow 2 – Arithmetic Operations on Tensors

This guide shows you how to perform the four arithmetic operations on tensors in Tensorflow 2: addition, subtraction, multiplication, and division. Addition You can add values to a tensor using the Python math addition operator or…

## 2 Ways to Expand a Tensor in Tensorflow 2

Expanding a tensor means adding a dimension (or an axis) to it. The two examples below show you two different ways to expand a tenor in Tensorflow 2. Example 1: Using tf.newaxis The code: Output: Example…

## 3 Ways to Create Random Tensors in Tensorflow 2

This article shows you a couple of different ways to create random tensors with Tensorflow 2. Using tf.random.Generator Example: Output: Shuffling the Order of Elements in a Tensor Another technique to produce a random tensor is…

## Tensorflow – Converting Tensors to Numpy Arrays

You can convert a tensor to a numpy array with ease by using the tensor.numpy() method or the np.array() function. Example: Output: Hope this helps!

## Tensorflow 2: Convert Arrays to Tensors (2 Examples)

A tensor is a multi-dimensional array with a uniform type. It is the standard data format used in Tensorflow. Below are a few examples of creating tensors from Numpy arrays by using tf.convert_to_tensor and tf.constant functions….

## Useful Settings for Google Colab You Should Know

This article will introduce you to some useful tips when writing and running code on Google Colab. Your work and research will be a little faster, a little more comfortable, a little more pleasant. Dark Mode…

## Most Popular Deep Learning Frameworks in 2021

It is difficult to determine which is the best among deep learning frameworks because each has its own strengths in different scenarios. However, it is quite possible to know which deep learning frameworks are trendy and…

## Python zip() function examples

This article is about the zip() function in Python 3. Overview zip() is a built-in function of Python that works like a zipper. It can take zero, one, or many iterables (lists, tuples, dictionaries, etc), aggregates…

## Python reduce() function examples

In this article, you will learn about the syntax and walk through 3 examples of the reduce() function in Python. Overview To use the reduce() function, you need to import it from the functools module as…