I upgraded to pytorch 0.3 (using conda env update) but get this error when run

lesson2-image_models ( cell 16:lrf=learn.lr_find(), learn.sched.plot() )

RuntimeError Traceback (most recent call last)

in ()

----> 1 lrf=learn.lr_find()

2 learn.sched.plot()

~/fastai/courses/dl1/fastai/learner.py in lr_find(self, start_lr, end_lr, wds)

234 layer_opt = self.get_layer_opt(start_lr, wds)

235 self.sched = LR_Finder(layer_opt, len(self.data.trn_dl), end_lr)

–> 236 self.fit_gen(self.model, self.data, layer_opt, 1)

237 self.load(‘tmp’)

238

~/fastai/courses/dl1/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, **kwargs)

143 n_epoch = sum_geom(cycle_len if cycle_len else 1, cycle_mult, n_cycle)

144 fit(model, data, n_epoch, layer_opt.opt, self.crit,

–> 145 metrics=metrics, callbacks=callbacks, reg_fn=self.reg_fn, clip=self.clip, **kwargs)

146

147 def get_layer_groups(self): return self.models.get_layer_groups()

~/fastai/courses/dl1/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_mombatch_num)

~/fastai/courses/dl1/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()

~/anaconda3/envs/fastai/lib/python3.6/site-packages/torch/nn/functional.py in binary_cross_entropy(input, target, weight, size_average)

1177 weight = Variable(weight)

1178

-> 1179 return torch._C._nn.binary_cross_entropy(input, target, weight, size_average)

1180

1181

RuntimeError: Expected object of type Variable[torch.cuda.FloatTensor] but found type Variable[torch.cuda.LongTensor] for argument #1 ‘target’