Skip to main content
Log in

Mojo function

log

log(value: Symbol) -> Symbol

Computes the elementwise natural logarithm of a symbolic tensor.

Creates a new op node to compute the elementwise natural logarithm of a symbolic tensor and adds it to the graph, returning the symbolic result.

The natural logarithm function log is defined as the inverse of the exponential function exp(), ie. it computes the value y in the equation x = e^y where e is Euler's number.

log(x) is undefined for x <= 0 for real numbers. Complex numbers are currently unsupported.

Args:

  • ​value (Symbol): The symbolic tensor to use as the input to the natural logarithm computation.

Returns:

A new symbolic tensor value representing the output of the absolute value computation.

Raises:

If the symbol doesn't represent a tensor value.

Was this page helpful?