Skip to content

torch.range 及 torch.arange区间说明错误 #53

@programmer9208

Description

@programmer9208

两个方法的结果区间和原始文档及实际测试结果写反了。
原文如下:
torch.arange: Returns a 1-D tensor of size ⌊end−startstep⌋ with values from the interval [start, end) taken with common difference step beginning from start.
torch.range: Returns a 1-D tensor of size ⌊end−startstep⌋+1 with values from start to end with step step. Step is the gap between two values in the tensor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions