모듈 안에는 하나 이상의 모듈들이 포함될 수 있고, 여러 모듈을 포함한 하나의 거대한 모듈을 모델이라고 부른다. 대부분의 torch.nn.Module의 method들은 모델에 method를 적용하면, 모델 내부의 모든 모듈들에도 적용시키는 기능을 지원한다. 그러나 우리가 직접 만든 custom 함수는 이 기능을 지원하지 않기 때문에, apply를 사용해 모델의 하위 모듈들에 함수를 재귀적으로 적용시킬 수 있다. Apply import torch from torch import nn from torch.nn.parameter import Parameter # Function class Function_A(nn.Module): def __init__(self, name): super().__init__() ..