How is the gradient is backpropogated from the critic to the generator if we set
for p in netD.parameters():
        p.requires_grad = False  # to avoid computation

in the generator training?
in this example

  
      github.com
  
  
    caogang/wgan-gp/blob/master/gan_cifar10.py 12
import os, sys
sys.path.append(os.getcwd())

import time
import tflib as lib
import tflib.save_images
import tflib.mnist
import tflib.cifar10
import tflib.plot
import tflib.inception_score

import numpy as np


import torch
import torchvision
from torch import nn
from torch import autograd
from torch import optim



  This file has been truncated. show original