Master should be relatively stable. If you don’t want to build from source, you could write your own in python, something like:

  
      github.com
  
  
    pytorch/pytorch/blob/77ddd5130b45891dd71f928aa7b91c50dcf1c2ad/test/common_nn.py#L286 3

            output[n][h][w] = -input[n][t_nhw][h][w] * norm
            total_weight_data += norm


if reduce and size_average:
    return output.sum() / total_weight_data
elif reduce:
    return output.sum()
return output




def nllloss_reference(input, target, weight=None, ignore_index=-100,
                  size_average=True, reduce=True):
if isinstance(target, Variable):
    target = target.data


def nll_loss_helper(input, target, weight, ignore_index):
    if target is ignore_index:
        return (0, 0)
    norm = 1 if weight is None else weight[target]
    result = -input[target] * norm
    return (result, norm)



  
  
    
    
  
  


and modify it to work with Variables. Alternatively, you could wait for the next release.