Using Data Loader in Learner ( Memory crash) Help!


I am having a hard time figuring out the use of Dataloaders in Fastai.

I am doing the Language Modelling.

d1 = DataLoader(df_trn, batch_size=4, shuffle=True, num_workers=2, pin_memory=True)
d2 = DataLoader(df_val, batch_size=32, shuffle=False, num_workers=2, pin_memory=True)

data_lm = TextLMDataBunch.from_df('./', train_df=d1, valid_df=d2, bs=2)

learner = language_model_learner(dl, pretrained_model=URLs.WT103_1, drop_mult=0.5)


I am getting the error:
Memory Error

Why I am I getting the memory issue when I am using dataloder?


My knowledge is very limited, however, try reducing d2 batch_size to 4