There are not yet scopes in pytorch, so you can’t attach names to Variables.
There is one exception though: inside a nn.Module, you can retrieve a name of Variables assigned to the module via it’s name (this is what you get from model.named_parameters().
Is there any news on this? This feature would be really nice in order to create orderly graphs in tensorboard. The autogenerated graphs can be really, really messy.