tf.keras.ops.logspace  |  TensorFlow v2.16.1 (original) (raw)

tf.keras.ops.logspace

Returns numbers spaced evenly on a log scale.

View aliases

Main aliases

tf.keras.ops.numpy.logspace

tf.keras.ops.logspace(
    start, stop, num=50, endpoint=True, base=10, dtype=None, axis=0
)

In linear space, the sequence starts at base ** start and ends withbase ** stop (see endpoint below).

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.
base The base of the log space. Defaults to 10.
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 evenly spaced samples 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 2024-06-07 UTC.