From the course: PyTorch Essential Training: Deep Learning

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Mathematical functions

Mathematical functions

- [Instructor] Mathematical functions are one of the most useful functions in PyTorch. Let's explore five types of built-in math functions, pointwise operations, reduction functions, comparison functions, linear algebra operations, and spectral and other math computations. Don't be overwhelmed with these fancy names. Let's figure them out together. Pointwise operations are named after their function as they perform an operation on each point in the tensor individually and return a new tensor. Some commonly used pointwise operation include some basic math functions, add(), mul(), div(), neg(), and true_divide(), functions for truncation, ceil(), clamp(), floor(), et cetera, logical functions, trigonometry functions, and so on. The second type of mathematical functions are reduction operations. They're also named after their role as they reduce numbers down to a single number or a smaller set of numbers that results in reducing the dimensionality or rank of the tensor. Reduction…

Contents