import torch
import torch.nn as nn

class model(nn.Module):
    
    def __init__(self):
        super(model,self).__init__()
        sequence_generated_var = [nn.Linear(5, 1)]
        self.gen_energy = nn.Sequential(*sequence_generated_var)
        self.gen_theta = nn.Sequential(*sequence_generated_var)
        self.gen_phi = nn.Sequential(*sequence_generated_var)
    def forward(self,x):
        return
  
m = model()
print([x[0] for x in m.named_parameters()])#outputs  ['gen_energy.0.weight', 'gen_energy.0.bias']
m._modules.keys() # outputs  odict_keys(['gen_energy', 'gen_theta', 'gen_phi'])

This is my minimal example.