Just a silly question. Whats the difference between import torch.nn as nn vs from torch import nn?

My linter is always complaining about import torch.nn as nn and tells me to change it to from torch import nn. Is there a difference between the 2?

Purist might see a difference (and please post these). I would use whichever approach you like. :wink:

1 Like