Avocodo-pytorch
Avocodo-pytorch copied to clipboard
why add detach() ?
why do you detach() https://github.com/rishikksh20/Avocodo-pytorch/blob/b298072e82a78b478697b30033ce4bfd20507634/train.py#L130 and not at https://github.com/rishikksh20/Avocodo-pytorch/blob/b298072e82a78b478697b30033ce4bfd20507634/train.py#L148 @rishikksh20
The Collaborative Multi-Band Discriminator in the line 130 is for updating the discriminator only, we take the detach to do copy to new tensor so that the generator don't get gradient.
In the line 148, we will update gradient for the generator
