PyTorch InstanceNorm2d()
PyTorch - torch.nn.InstanceNorm2d[1]
torch.nn.InstanceNorm2d(
num_features: int,
eps: float = 1e-5,
momentum: float = 0.1,
affine: bool = False,
track_running_stats: bool = False,
device=None,
dtype=None
) -> None:
m = torch.nn.InstanceNorm2d(100)
m = torch.nn.InstanceNorm2d(100, affine=True)
input = torch.randn(20, 100, 35, 45)
output = m(input)
explain
- Applies Instance Normalization over a 4D input (a mini-batch of 2D inputs with additional channel dimension) as described in the paper Instance Normalization: The Missing Ingredient for Fast Stylization.
- 위 논문에서 사용된 Instance Normalization을 4차원 입력 데이터에 적용시킨다.
Instance Normalization 리뷰
Reference
1. INSTANCENORM2D, PyTorch, https://pytorch.org/docs/stable/generated/torch.nn.InstanceNorm2d.html#torch.nn.InstanceNorm2d