My mistake there. I thought nb_classes was a list of the classes indices.
nb_classes = 1103

However, the training function threw another error.
IndexError: too many indices for tensor of dimension 1
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-77-d05ecce66b45> in <module>()
      1 total_step = len(loader_train)
      2 for epoch in range(num_epochs):
----> 3     for i, (images, labels) in enumerate(loader_train):
      4         images, labels = Variable(data), Variable(target)
      5 

/opt/conda/lib/python3.6/site-packages/torch/utils/data/dataloader.py in __next__(self)
    613         if self.num_workers == 0:  # same-process loading
    614             indices = next(self.sample_iter)  # may raise StopIteration
--> 615             batch = self.collate_fn([self.dataset[i] for i in indices])
    616             if self.pin_memory:
    617                 batch = pin_memory_batch(batch)

/opt/conda/lib/python3.6/site-packages/torch/utils/data/dataloader.py in <listcomp>(.0)
    613         if self.num_workers == 0:  # same-process loading
    614             indices = next(self.sample_iter)  # may raise StopIteration
--> 615             batch = self.collate_fn([self.dataset[i] for i in indices])
    616             if self.pin_memory:
    617                 batch = pin_memory_batch(batch)

<ipython-input-69-ac5ff07bb12a> in __getitem__(self, index)
     17         #label = list(map(int, label.split(' ')))
     18         target = torch.zeros(nb_classes)
---> 19         target[label] = 1.
     20         if self.transform is not None:
     21             image = self.transform(image)

IndexError: too many indices for tensor of dimension 1