Solved by ptrblck in post #2 
              
              
                This would be the expected shapes for the “standard” multi-class classification use case, but as described in the docs the expected tensor can have additional dimensions (d1, d2, ... , dk). 
For your use case you could thus use the model output as [batch_size, nb_classes, seq_len] and the target as…