분석시각화 대회 코드 공유 게시물은
내용 확인 후
좋아요(투표) 가능합니다.
HAICon2021 산업제어시스템 보안위협 탐지 AI 경진대회
📏 Baseline에 대하
안녕하세요, JJA입니다.
제공된 Baseline코드는 예측 모델로 Stacked GRU를 사용하며 아래 그림과 같이 output을 만들어냅니다.
이 때, input의 첫 번째 sample을 왜 output과 더하도록 구현을 했을까요?
이렇게 구현된 모델은 '예측'이 아니라 '예측되어야 할 sample과 첫 번째 sample간의 차이'를 학습합니다.
--> prediction = x[0] + model_out
--> model_out = prediction - x[0]
해당 방법론을 사용하는 특별한 이유가 있을까요?
N_HIDDENS = 100 N_LAYERS = 3 BATCH_SIZE = 512 class StackedGRU(torch.nn.Module): def __init__(self, n_tags): super().__init__() self.rnn = torch.nn.GRU( input_size=n_tags, hidden_size=N_HIDDENS, num_layers=N_LAYERS, bidirectional=True, dropout=0, ) self.fc = torch.nn.Linear(N_HIDDENS * 2, n_tags) def forward(self, x): x = x.transpose(0, 1) # (batch, seq, params) -> (seq, batch, params) self.rnn.flatten_parameters() outs, _ = self.rnn(x) out = self.fc(outs[-1]) return x[0] + out
DACON Co.,Ltd | CEO Kookjin Kim | 699-81-01021
Mail-order-sales Registration Number: 2021-서울영등포-1704
Business Providing Employment Information Number: J1204020250004
#901, Eunhaeng-ro 3, Yeongdeungpo-gu, Seoul 07237
E-mail dacon@dacon.io |
Tel. 070-4102-0545
Copyright ⓒ DACON Inc. All rights reserved