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'
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?