The function producing the error is the following from the Ignite library:
def to_onehot(indices, num_classes):
    onehot = torch.zeros(indices.size(0), num_classes, device=indices.device)
    return onehot.scatter_(1, indices.unsqueeze(1), 1)

The error I get is:

RuntimeError: invalid argument 3: Index tensor must have same dimensions as output tensor at c:\programdata\miniconda3\conda-bld\pytorch_1533096106539\work\aten\src\thc\generic/THCTensorScatterGather.cu:295