This is the part of preparing data.
I think all batches are same size.
# this is tokenizer for japanese
import janome
from janome.tokenizer import Tokenizer
j_t = Tokenizer()
def tokenizer(text): 
    return [tok for tok in j_t.tokenize(text, wakati=True)]

SRC = data.Field(sequential=True, tokenize=tokenizer,init_token='<sos>',
                            eos_token='<eos>', lower=True)
TRG = data.Field(sequential=True, tokenize=tokenizer,init_token='<sos>',
                            eos_token='<eos>', lower=True)

train, val, test = data.TabularDataset.splits(
        path="./", train='train.tsv',
        validation='val.tsv', test='test.tsv', format='tsv',
        fields=[('SRC', SRC), ('TRG', TRG)])

SRC.build_vocab(train, min_freq=1)
TRG.build_vocab(train, min_freq=1)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

train_batch_size = 20
test_batch_size = 10
eval_batch_size = 2
train_iter, val_iter, test_iter = data.BucketIterator.splits((train, val, test), sort = False,  batch_sizes = (train_batch_size,eval_batch_size, test_batch_size), device= device)