import torch
import torch.nn as nn 

# m = nn.LogSoftmax(dim=1)
# loss = nn.NLLLoss()
# # input is of size N x C = 1 x 3
# input = torch.tensor([[1,0,0]], requires_grad=True, dtype=torch.float)
# # each element in target has to have 0 <= value < C
# target = torch.tensor([1])
# output = loss(m(input), target)
# print(m(input))
# print(m(input).exp())
# print(output)

import torch
import torch.nn as nn 

# m = nn.LogSoftmax(dim=1)
# loss = nn.NLLLoss()
# # input is of size N x C = 1 x 3
# input = torch.tensor([[1,0,0]], requires_grad=True, dtype=torch.float)
# # each element in target has to have 0 <= value < C
# target = torch.tensor([1])
# output = loss(m(input), target)
# print(m(input))
# print(m(input).exp())
# print(output)

# m = nn.LogSoftmax(dim=1) # loss = nn.NLLLoss() # # input is of size N x C = 1 x 3 # input = torch.tensor([[1,0,0]], requires_grad=True, dtype=torch.float) # # each element in target has to have 0 <= value < C # target = torch.tensor([1]) # output = loss(m(input), target) # print(m(input)) # print(m(input).exp()) # print(output)