Mam:

self.type(torch.complex128)



use .to these days instead of .type (which is a very odd function and the most surprising thing is that it hasn’t been deprecated 2 years ago).
.to (or .type) changes the state of the NeuralNet. This also changes all submodules. But if you add submodules later, these will not be party to the change but will have the default dtype (float).
this suggests that moving the .to to after the submodule registration should work better.

Best regards
Thomas