Hello, so I am working on this generative model, and part of the loss requires the output of torch.max(torch.nn.functional.conv2d(perdict_img,filter)) with different filters. These filters are supposed to keep the prefixed weight during the training.
I set them as requires_grad=False and then I have this error: RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn.
Is there any way to make it work without embedding this computation as some fixed layer of the model?