xuebinqin / DIS

This is the repo for our new project Highly Accurate Dichotomous Image Segmentation
Apache License 2.0
2.22k stars 258 forks source link

运行train_valid_inference_main.py文件时爆显存 #118

Open hjj-lmx opened 5 months ago

hjj-lmx commented 5 months ago

net = ISNetGTEncoder() #UNETGTENCODERCombine() 和 hypar["model"] = ISNetDIS() #U2NETFASTFEATURESUP()报红,但是不影响运行,当跑到训练时报torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 64.00 MiB. GPU 0 has a total capacity of 12.00 GiB of which 0 bytes is free. Of the allocated memory 10.08 GiB is allocated by PyTorch, and 54.95 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)