tf.keras.ops.geomspace
Stay organized with collections
Save and categorize content based on your preferences.
Returns numbers spaced evenly on a log scale (a geometric progression).
tf.keras.ops.geomspace(
start, stop, num=50, endpoint=True, dtype=None, axis=0
)
This is similar to logspace, but with endpoints specified directly
instead of as logarithms. Each output sample is a constant multiple of
the previous.
Args |
start
|
The starting value of the sequence.
|
stop
|
The final value of the sequence, unless endpoint is False.
In that case, num + 1 values are spaced over the interval in
log-space, of which all but the last (a sequence of length num)
are returned.
|
num
|
Number of samples to generate. Defaults to 50.
|
endpoint
|
If True, stop is the last sample. Otherwise, it is not
included. Defaults to True.
|
dtype
|
The type of the output tensor.
|
axis
|
The axis in the result to store the samples. Relevant only
if start or stop are array-like.
|
Note |
Torch backend does not support axis argument.
|
Returns |
A tensor of num samples, evenly spaced on a log scale.
|
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. Some content is licensed under the numpy license.
Last updated 2026-10-31 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 2026-10-31 UTC."],[],[]]