pytorch.range() 和 pytorch.arange() 的区别

    import torch

    y = torch.range(1, 6)

    print(y)
    print(y.dtype)

    z = torch.arange(0, 6)
    print(z)
    print(z.dtype)
发布了2718 篇原创文章 · 获赞 1004 · 访问量 536万+

猜你喜欢

转载自blog.csdn.net/jacke121/article/details/104694897