albumentations-team / autoalbument

AutoML for image augmentation. AutoAlbument uses the Faster AutoAugment algorithm to find optimal augmentation policies. Documentation - https://albumentations.ai/docs/autoalbument/
https://albumentations.ai/docs/autoalbument/
MIT License
203 stars 20 forks source link

issue with retain_graph=True #31

Open Mordokkai opened 3 years ago

Mordokkai commented 3 years ago

Hi,

I wrote my dataset.py and search.yaml for segmentation. The first forward pass is ok but at the first backward pass I get this error message:

File "anaconda3/envs/nn_seg/lib/python3.8/site-packages/torch/autograd/init.py", line 147, in backward Variable._execution_engine.run_backward( RuntimeError: Trying to backward through the graph a second time (or directly access saved variables after they have already been freed). Saved intermediate values of the graph are freed when you call .backward() or autograd.grad(). Specify retain_graph=True if you need to backward through the graph a second time or if you need to access saved variables after calling backward.

Full log in log.txt

Do you have any idea where this problem could come from ? Bests,