I wanted to specify the ignore_index for the nn.NLLLoss2d() criterion in my network, but when I initialize the loss in my script, I get the following error:
  File "trainer.py", line 36, in <module>
    criterion = nn.NLLLoss2d(ignore_index=0)

TypeError: __init__() got an unexpected keyword argument 'ignore_index'

The documentation 14 mentions it, and I can even see in the online source code 10 that the ignore_index is being used in the NLLLoss() class from which NLLLoss2d() inherits.
EDIT: Turns out the ignore_index() has been implemented on GitHub but isn’t on the latest release. So, how can I update the PyTorch packages on my computer to match the github repo, without breaking it’s management by Anaconda?