배치 정규화가 적용되지 않은 모델을 선언(객체화)합니다.

    코드 8-10 배치 정규화가 적용되지 않은 모델 선언

    model = NormalNet()
    print(model)

    코드를 실행하면 다음과 같이 배치 정규화가 적용되지 않은 모델의 네트워크가 출력됩니다.

    NormalNet(
      (classifier): Sequential(
        (0): Linear(in_features=784, out_features=48, bias=True)
        (1): ReLU()
        2): Linear(in_features=48, out_features=24, bias=True)
        (3): ReLU()
        (4): Linear(in_features=24, out_features=10, bias=True)
      )
    )

    배치 정규화가 적용된 모델을 선언(객체화)합니다.

    코드 8-11 배치 정규화가 적용된 모델 선언

    model_bn = BNNet()
    print(model_bn)
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.