ClassNLLCriterion - adding classes weights input

Adding class weights is relevant when you have unbalanced training set, adding custom weights can help in these cases.

Example for input weights -

 --- compute frequency for each class
class_freqs = torch.Tensor(nLabels):fill(0)
for iImage = 1,trainData:size() do
   label = trainData.labels[iImage]
   class_freqs[label] = class_freqs[label] + 1
end

--- each class weight is inverse proportional to the number of samples in the class
class_weights = torch.Tensor(nLabels):fill(0)
for iLabel = 1,nLabels do
   class_weights[iLabel] = 1 / class_freqs[iLabel]
end
class_weights = class_weights / class_weights:sum()