So one example of a hack that would work is the following:
I introduced a self.cuda_flag:
if type(self.bias.data) == torch.cuda.FloatTensor and self.cuda_flag == False:
            self.context = self.context.cuda()
            self.cuda_flag = True

While this does solve the problem, I’m wondering if there is a more graceful and efficient way to do this.