Not sure how much this will help, but you could try to optimize your code using torch.jit.trace 5 and compare the performance.


Does ComplexBatchNorm2d 9 have this memory leak or another module? I could have a look at it and try to narrow down possible issues.


Do you mean the complex modules do not improve the performance of your overall model compared to just the “real” input?