I am working on a HybridBlock-based version of SN-GAN and would like to incorporate a
HybridBlock into a model that uses spectrally normalized convolutions. The official Gluon SN-GAN example almost works for symbols after a few simple modifications, but I am not sure how to proceed with modifying the lines:
with autograd.pause(): self.u.set_data(_u)
where the value of the weight matrix’s cached singular vector parameter is updated.
This might be a silly question but what is the right way to update this line to support calculations with NDArrays and Symbols while (a) not messing up backpropagation during training and (b) allowing the cached vector’s value to be updated on each forward pass in both symbolic and imperative modes?