Skip to content
fn

logspace_op

→TensorImplPtr
int logspace_op(double start, double stop, int num, double base, Dtype dt, Device device, bool requires_grad)

Python wrappers

Public Python APIs implemented by this engine symbol.

Create a 1-D tensor of num values logarithmically spaced.

Math

Element ii equals base ti\text{base}^{\,t_i} where tit_i are the values produced by linspace(start, stop, num).

Parameters

startdouble
Log-domain start.
stopdouble
Log-domain stop (inclusive).
numint64_t
Number of samples (must be ≥0\ge 0).
basedouble
Logarithm base.
dtDtype
Element dtype.
deviceDevice
Target device.
requires_gradbool
Attach a fresh autograd leaf when true.

Returns

TensorImplPtr

1-D tensor of length num.