Can you develop the question (maybe with an example). I find the lexicon you used a bit confusing. One rarely defines a class within a function. Do you mean instantiate? What’s the relationship between nn.Module and nn.Sequential? Sequential is just a type of module.