Hi, ptrblck
Thanks in advance
This is the minimal code snippet that triggers the errors:
int main(){
CustArgsSSL args1;
auto newgan = ppGAN(MnistLabel(10), MnistUnlabel(), MnistTest(), args1);//

}
struct ppGANImpl: torch::nn::Module{
ppGANImpl(torch::data::datasets::MNIST dataset1, torch::data::datasets::MNIST dataset2, torch::data::datasets::MNIST dataset3, CustArgsSSL &args)
        : discriminator(register_module("discriminator", Discriminator1())),doptim(torch::optim::Adam(discriminator->parameters(),torch::optim::AdamOptions(args.lr_default).betas({args.momentum,0.999})) )
        ,
        generator(register_module("generator", Generator1(100, 28*28))),goptim(torch::optim::Adam(generator->parameters(),torch::optim::AdamOptions(args.lr_default).betas({args.momentum,0.999}))

// generator(generator1)
)
{
if (!args.savedir.empty()){
        torch::load(generator,"/path/G.pkl");

        torch::load(discriminator,"/path/D.pkl");
    }
    else {


        torch::save(generator,"/path/G.pkl");
        torch::save(discriminator,"/path/D.pkl");
    }