Skip to content

[Bug] std results are inconsistent #971

@ChengYen-Tang

Description

@ChengYen-Tang

python:

>>> import torch
>>> x = torch.tensor([0.0, 1.0, 2.0])
>>> torch.std(x, False)
tensor(0.8165)

image

C#

using static TorchSharp.torch;

Tensor x = tensor(new double[] { 0, 1, 2 });
Console.WriteLine(x.std(false).ToString(style: TorchSharp.TensorStringStyle.Default));

// [], type = Float64, device = cpu, value = 1

image

🤔🤔🤔🤔🤔🤔🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions