정규화 1 썸네일형 리스트형 딥러닝 기초 핵심 개념 2 Dropout Dropout은 학습 중에 설정한 확률값에 따라서 일부 뉴런을 제거하여 과대적합을 방지하는 기법입니다. 특정 뉴런에만 집중해서 학습하지 않도록 과대적합을 방지하도록 사용합니다. 더보기 import torch import torch.nn as nn class Modelnn.Module: def __init__self: superModel,self.__init__ self.fc1 = nn.Linear10,5 self.dropout = nn.Dropout0.5 # dropout 비율은 50% self.fc2 = nn.Linear5,1 def forwardself,x: x = torch.reluself.fc1(x) x = self.dropoutx x = .. 이전 1 다음