Thank you for your response. I tried the following code to regenerate the error:
import pandas as pd
import pickle
import torch
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
from tqdm import tqdm, tqdm_notebook
import torch.optim as optim
from torch.utils.data import DataLoader

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

vocab_size = 257945
EMBEDDING_SIZE = 100
sequences = np.random.randint(0, vocab_size, size=(1188946, 200))
sequences = torch.from_numpy(sequences)
sequences = sequences.type(torch.long)
labels = np.random.randint(0, 2, size=(1188946, 1))
labels = torch.from_numpy(labels)
labels = labels.type(torch.float)
train = list(zip(sequences, labels))

But it does not show the error and it works. However, when I run my original code, I still get the error. All of the data dimensions are the same. My original code is as follows:
MAX_LEN = 200
OOV_TOKEN = '<OOV>'
TRUNCATE_MODE = 'post'
PADDING_MODE = 'post'
EMBEDDING_SIZE = 100

tokenizer = Tokenizer(oov_token=OOV_TOKEN)
tokenizer.fit_on_texts(sentences)
sequences = tokenizer.texts_to_sequences(sentences)
sequences = pad_sequences(sequences, maxlen=MAX_LEN, padding=PADDING_MODE, truncating=TRUNCATE_MODE)
sequences = torch.from_numpy(sequences)
sequences = sequences.type(torch.long)
vocab_size = len(tokenizer.word_index)

labels = np.array([some formula to find the labels])
labels = torch.from_numpy(np.reshape(labels, (-1, 1)))
labels = labels.type(torch.float)

train = list(zip(sequences, labels))

I would appreciate it if you could help me with this issue.