tfg.math.math_helpers.factorial

Stay organized with collections Save and categorize content based on your preferences.

Computes the factorial of n.

In the following, A1 to An are optional batch dimensions.

n A tensor of shape [A1, ..., An].

A tensor of shape [A1, ..., An].