SAM-Adapter-PyTorch icon indicating copy to clipboard operation
SAM-Adapter-PyTorch copied to clipboard

Eval function is not wrapped with torch.no_grad()

Open HaisongDing opened this issue 1 year ago • 0 comments

https://github.com/tianrun-chen/SAM-Adapter-PyTorch/blob/39c339cf481c068405e64ba48122cf3dda782260/train.py#L79

Eval is not wrapped with torch.no_grad(), there could be a data (grad) leak.

HaisongDing avatar Aug 15 '24 02:08 HaisongDing