human
Can you provide a code to 3 given the following:
3. BoWClassifier 정의"
Please write code following the instructions in jupyter notebook style.
assistant
#Here is code to 3.

class BoWClassifier(nn.Module):
    
    def __init__(self,vocab_size,output_size):
        super(BoWClassifier, self).__init__()
        
#         self.layer = nn.Linear(vocab_size,hidden_size)
        self.outlayer = nn.Linear(vocab_size,output_size)

    def forward(self,inputs):
        
#         out = F.relu(self.layer(inputs))
        
        return F.log_softmax(self.outlayer(inputs))

model = BoWClassifier(len(word2index),len(target2index))
loss_function = nn.CrossEntropyLoss()
optimizer = optim.SGD(model.parameters(),lr=0.0001)