python中以下导入样式有区别吗?

jai*_*j95 8 python import python-import

我正在浏览代码库并注意到以下导入模块的样式
import torch.nn as nn

在我个人的工作中,我一直使用以下方法
from torch import nn

这两种导入方式有什么区别吗?