Skip to content

Why use float_64 for gradient #2

@Stonesjtu

Description

@Stonesjtu

Hi wang,
I'm just wondering why to convert the gradient Tensor into float64, I thought they might be just float32. And it should be more accurate than SGD required.

grad = p.grad.to(torch.device("cpu")).detach().numpy().astype(np.float64)

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