Data Preprocessing (Part 2)
Learn to preprocess TF datasets using the map, filter, and reduce transformations.
The TF framework provides us with the tf.data
API to construct TF datasets. This API allows us to preprocess TF datasets using various transformations, such as map
, filter
, and reduce
. We can apply these transformations using a lambda
function. This lesson illustrates the use of the transformations mentioned above.
The lambda
function
A lambda
in Python is an anonymous function that can input any number of arguments but have only one expression. The syntax for a lambda
function is:
lambda arguments: expression
Syntax of a lambda function in Python
In this syntax, we separate the input arguments
by commas, and the function evaluates the expression
...
Get hands-on with 1400+ tech skills courses.