torch.logspace
function logspace(start: number, end: number, steps: number): Tensorfunction logspace(start: number, end: number, steps: number, base: number, options: TensorOptions): TensorCreate a tensor with logarithmically spaced values.
Returns a 1-D tensor of 'steps' values logarithmically spaced with exponents from start to end.
Parameters
startnumber- Starting exponent
endnumber- Ending exponent
stepsnumber- Number of values to generate
Returns
Tensor– A 1-D tensor with logarithmically spaced valuesExamples
const a = torch.logspace(0, 2, 3); // [1, 10, 100] (base 10)
const b = torch.logspace(0, 3, 4, 2); // [1, 2, 4, 8] (base 2)