Skip to content

eval.py中的推理速度和显存占用问题 #6

@hch0086

Description

@hch0086

感谢您的工作!
在尝试复现您论文效果时发现,eval的推理速度偏慢,且显存占用过大(3090上batchsize只能设置到12左右)
检查代码发现,推理时似乎遗漏了:
with torch.no_grad():
导致不必要的梯度计算以及显存占用

祝好!

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