Skip to content

执行训练脚本时报错,不知道是否为torch版本的原因 #6

Open
@littletomatodonkey

Description

@littletomatodonkey

你好,想问下项目代码运行的torch版本是多少呢?

我使用torch==1.10.0,有以下的错误,把continuous操作修改为clone以及relu修改为inplace=False,还是会报相同的问题(训练的过程中,我设置了use_fp16=False)

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [2, 768, 32, 32]], which is output 0 of ReluBackward0, is at version 1; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

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