paarthneekhara / AdversarialDeepFakes

26 stars 5 forks source link

RuntimeError: Output 0 of UnbindBackward is a view and is being modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one. #23

Open awesomealex1 opened 9 months ago

awesomealex1 commented 9 months ago

Traceback (most recent call last): File "attack.py", line 361, in create_adversarial_video(**vars(args)) File "attack.py", line 262, in create_adversarial_video perturbed_image, attack_meta_data = attack_algos.robust_fgsm(processed_image, model, model_type, cuda) File "/exports/eddie/scratch/s2017377/code/AdversarialDeepFakes/attack_algos.py", line 111, in robust_fgsm prediction, output, logits = predict_with_model(transformed_img, model, model_type, cuda=cuda) File "/exports/eddie/scratch/s2017377/code/AdversarialDeepFakes/attack_algos.py", line 30, in predict_with_model normalized_image = norm_transform(resizedimage) File "/exports/eddie/scratch/s2017377/anaconda/envs/ff/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 60, in call img = t(img) File "/exports/eddie/scratch/s2017377/code/AdversarialDeepFakes/dataset/transform.py", line 39, in call t.sub(m).div_(s) RuntimeError: Output 0 of UnbindBackward is a view and is being modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one.