how to get pytroch model layer name code example Example: how to get pytroch model layer name for name, layer in model.named_modules(): print(name, layer)