@m_jahangeer wrote:
I was trying to apply the following code
and I was successful running the code in its own but when I switched in my data there seems to be this error coming up. Any assistance will be appreciated.
data_lm_lab = TextLMDataBunch.from_csv('', 'text_data.csv') learn = language_model_learner(data_lm_lab, pretrained_model=URLs.WT103, drop_mult=0.7) learn.fit_one_cycle(1, 1e-2) learn.save_encoder('ft_enc')
This is what the data looks like
I get the following error
> /usr/local/lib/python3.6/dist-packages/fastai/basic_train.py in validate(model, dl, loss_func, cb_handler, pbar, average, n_batch) > 55 if n_batch and (len(nums)>=n_batch): break > 56 nums = np.array(nums, dtype=np.float32) > ---> 57 if average: return (to_np(torch.stack(val_losses)) * nums).sum() / nums.sum() > 58 else: return val_losses > 59 > > RuntimeError: expected a non-empty list of Tensors
Posts: 1
Participants: 1