The LSTMClassifier is currently defined as the following:
class LSTMClassifier(nn.Module):
    def __init__(self, n_categories, batch_size, n_inp, n_hid, n_layers, dropout=0.5):
        super(LSTMClassifier, self).__init__()
        self.n_hid = n_hid
        self.n_layers = n_layers
        self.batch_size = batch_size
        self.n_categories = n_categories

        self.lstm = nn.LSTM(input_size=n_inp, hidden_size=n_hid, num_layers=n_layers, dropout=dropout, batch_first=True)
        self.hidden_to_category = nn.Linear(n_hid, n_categories)

        count = 0
        for param in self.lstm.parameters():
            self.register_parameter(name="lstm_{}".format(count), param=param)
            count += 1

        count = 0
        for param in self.hidden_to_category.parameters():
            self.register_parameter(name="hidden_{}".format(count), param=param)
            count += 1

        self.init_weights()

    def init_weights(self):
        initrange = 1
        self.hidden_to_category.bias.data.zero_().cuda()
        self.hidden_to_category.weight.data.uniform_(-initrange, initrange).cuda()

    def forward(self, input, lengths, hidden):
        batch_packed_sequences = nn.utils.rnn.pack_padded_sequence(input, lengths, batch_first=True, enforce_sorted=False)
        output, (hidden_last_t, _) = self.lstm(batch_packed_sequences, hidden)
        hidden_last_t_hidden_layer = hidden_last_t[-1, :]
        decoded = self.hidden_to_category(hidden_last_t_hidden_layer)
        return decoded, output, hidden

    def init_hidden(self, batch_size):
        weight = next(self.parameters())
        return (
            weight.new_zeros(self.n_layers, batch_size, self.n_hid),
            weight.new_zeros(self.n_layers, batch_size, self.n_hid)
        )

The previous version I posted didn’t feed the right lstm output given what is given is a packed sequence to the following linear layer.  My inputs are the following within the first minibatch:

cuda_batch_padded_seq shape=[32, 16958, 2]
cuda_batch_padded_len shape=[32]
hidden shape=([20, 32, 10], [20, 32, 10])
decoded shape=[32, 5]
cuda_batch_categories shape=[32]


Changing torch.backends.cudnn.enabled = False allows the model to proceed without any problems.  I’ve changed the lstm layers, hidden layers, and batch_size to be of different sizes, but regardless of what I change them to I still get the same CUDNN_STATUS_EXECUTION_FAILED error.  I’ve checked the memory usage using nvidia-smi and it looks like I have plenty room with and without cudnn enabled.
Your help figuring out how I can train with CUDNN enabled would be greatly appreciated!