SPAR (1) 썸네일형 리스트형 [pytorch] pytorch cross entropy 사용시 주의할 점, tf sparse categorical cross entropy in pytorch? softmax가 이미 F.cross_entropy에 포함되어 있다. 따로 레이어에 추가히지 말자. LSTM 구현 예제 1. return_sequences가 없을 때 hidden_dim = 75 #150 class SimpleLSTM(LightningModule): def __init__(self, input_features, output_features, batch_first, num_classes): super(SimpleLSTM, self).__init__() self.lstm = nn.LSTM(input_size=input_features, hidden_size=output_features, batch_first=batch_first) self.linear = nn.Linear(output_feat.. 이전 1 다음