Join the newly launched Discord
community for real-time discussions, peer support, and direct interaction with the Meridian team!
meridian.backend.log Stay organized with collections
Save and categorize content based on your preferences.
Computes natural logarithm of x element-wise.
meridian
.
backend
.
log
(
x
:
Annotated
[
Any
,
TV_Log_T
],
name
=
None
)
->
Annotated
[
Any
,
TV_Log_T
]
I.e., \(y = \log_e x\).
Example:
>>>
x
=
tf
.
constant
([
0
,
0.5
,
1
,
5
])
>>>
tf
.
math
.
log
(
x
)
< tf
.
Tensor
:
shape
=
(
4
,),
dtype
=
float32
,
numpy
=
array
([
-
inf
,
-
0.6931472
,
0.
,
1.609438
],
dtype
=
float32
)
>
See: https://en.wikipedia.org/wiki/Logarithm
A Tensor
. Must be one of the following types: bfloat16
, half
, float32
, float64
, complex64
, complex128
.
A name for the operation (optional).
A Tensor
. Has the same type as x
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-15 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-15 UTC."],[],[]]