torch.nn has no attribute 'Conv2D'

    [Error] AttributeError: module 'torch.nn' has no attribute 'Conv2D' 해결 방법

    멍청한 실수를 했지만.. 반복하지 않기 위해 기록하고자 한다. AttributeError: module 'torch.nn' has no attribute 'Conv2D' 속성에러 : torch.nn이라는 모듈에는 Conv2D라는 속성이 없다. 이상하다.. 분명히 고쳤는데 왜 안될까...라고 생각하고 디버깅을 했다. (pointwise가 틀렸다고 나와있는데도 못 알아차렸다..) class Depthwise(nn.Module): def __init__(self, in_channels, out_channels, stride=1): super().__init__() self.depthwise = nn.Sequential( nn.Conv2d(in_channels, in_channels, 3, stride=stri..