Hi Robert
I am getting the following error when I call learn.fit.
Did you make a change to the fastai library to overcome this (I updated to the latest version befoire running this today)?
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-38-688cebf597d5> in <module>()
----> 1 learn.fit(0.01, 3)
D:\FASTAI\fastai\fastai\learner.py in fit(self, lrs, n_cycle, wds, **kwargs)
211 self.sched = None
212 layer_opt = self.get_layer_opt(lrs, wds)
--> 213 self.fit_gen(self.model, self.data, layer_opt, n_cycle, **kwargs)
214
215 def lr_find(self, start_lr=1e-5, end_lr=10, wds=None):
D:\FASTAI\fastai\fastai\learner.py in fit_gen(self, model, data, layer_opt, n_cycle, cycle_len, cycle_mult, cycle_save_name, metrics, callbacks, use_wd_sched, norm_wds, wds_sched_mult, **kwargs)
158 n_epoch = sum_geom(cycle_len if cycle_len else 1, cycle_mult, n_cycle)
159 fit(model, data, n_epoch, layer_opt.opt, self.crit,
--> 160 metrics=metrics, callbacks=callbacks, reg_fn=self.reg_fn, clip=self.clip, **kwargs)
161
162 def get_layer_groups(self): return self.models.get_layer_groups()
D:\FASTAI\fastai\fastai\model.py in fit(model, data, epochs, opt, crit, metrics, callbacks, **kwargs)
84 batch_num += 1
85 for cb in callbacks: cb.on_batch_begin()
---> 86 loss = stepper.step(V(x),V(y))
87 avg_loss = avg_loss * avg_mom + loss * (1-avg_mom)
88 debias_loss = avg_loss / (1 - avg_mom**batch_num)
D:\FASTAI\fastai\fastai\model.py in step(self, xs, y)
41 if isinstance(output,(tuple,list)): output,*xtra = output
42 self.opt.zero_grad()
---> 43 loss = raw_loss = self.crit(output, y)
44 if self.reg_fn: loss = self.reg_fn(output, xtra, raw_loss)
45 loss.backward()
D:\Anaconda3\lib\site-packages\torch\nn\functional.py in nll_loss(input, target, weight, size_average, ignore_index, reduce)
1047 weight = Variable(weight)
1048 if dim == 2:
-> 1049 return torch._C._nn.nll_loss(input, target, weight, size_average, ignore_index, reduce)
1050 elif dim == 4:
1051 return torch._C._nn.nll_loss2d(input, target, weight, size_average, ignore_index, reduce)
RuntimeError: Expected object of type Variable[torch.cuda.LongTensor] but found type Variable[torch.cuda.IntTensor] for argument #1 'target'