I was browsing the pytorch documentation and noticed a different way of expressing imports that I never encountered before:
import torch.nn as nn
I would have usually written this as:
from torch import nn
At a first glance both methods look to me like they achieve the same thing, am I correct? Are there any differences between those methods? If not is there a best-practice suggesting to use one over the other?