Solved by ptrblck in post #43 
              
              
                torch.cat will return a tensor, so it seems you haven’t used it to create all_classes, have you? 
Could you post an executable code snippet showing your use case and explain what results are expected?