@ptrblck  I’m facing a similar error:
model = torch.nn.Sequential(
    torch.nn.Conv1d(1, 1024, kernel_size=7, stride=1, padding=0, dilation=1, groups=1, bias=True),
    torch.nn.BatchNorm1d(1024),
    torch.nn.ReLU(inplace=True),
    torch.nn.Conv1d(1024, 1024, kernel_size=1, stride=1, padding=0, dilation=1, groups=1, bias=True),
    torch.nn.BatchNorm1d(1024),
    torch.nn.ReLU(inplace=True),
    torch.nn.Conv1d(1024, 51, kernel_size=1, stride=1, padding=0, dilation=1, groups=1, bias=True)
    )


classifier = torch.nn.Linear(51 * 7, 51)
model.cuda()

for e in range(num_epochs):
    running_loss = 0
    for batch in train_loader:
        features, labels = batch[:, :-1], batch[:, -1]
        features, labels = features.to(device), labels.to(device)
        features = features.unsqueeze(dim=1)
        outputs  = model(features)
        outputs  = outputs.view(outputs.size(0), -1)
        scores   = classifier(outputs)
        loss = criterion(outputs, labels.long())
        loss.backward()
        optimizer.zero_grad()
        optimizer.step()
        running_loss += loss.item()

Here’s the trace
RuntimeError                              Traceback (most recent call last)
<ipython-input-93-8ef77d1136dc> in <module>
     11         outputs  = model(features)
     12         outputs  = outputs.view(outputs.size(0), -1)
---> 13         scores   = classifier(outputs)
     14         loss = criterion(outputs, labels.long())
     15         loss.backward()

~/miniconda3/envs/mytraining/lib/python3.6/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
    887             result = self._slow_forward(*input, **kwargs)
    888         else:
--> 889             result = self.forward(*input, **kwargs)
    890         for hook in itertools.chain(
    891                 _global_forward_hooks.values(),

~/miniconda3/envs/mytraining/lib/python3.6/site-packages/torch/nn/modules/linear.py in forward(self, input)
     92 
     93     def forward(self, input: Tensor) -> Tensor:
---> 94         return F.linear(input, self.weight, self.bias)
     95 
     96     def extra_repr(self) -> str:

~/miniconda3/envs/mytraining/lib/python3.6/site-packages/torch/nn/functional.py in linear(input, weight, bias)
   1751     if has_torch_function_variadic(input, weight):
   1752         return handle_torch_function(linear, (input, weight), input, weight, bias=bias)
-> 1753     return torch._C._nn.linear(input, weight, bias)
   1754 
   1755 

RuntimeError: Tensor for 'out' is on CPU, Tensor for argument #1 'self' is on CPU, but expected them to be on GPU (while checking arguments for addmm)