Created
December 1, 2017 16:01
-
-
Save thiagolcks/3849fcc5eb43eaaf2c0fb4032a4073d0 to your computer and use it in GitHub Desktop.
Full Error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
TypeError Traceback (most recent call last) | |
<ipython-input-135-ff787261f72f> in <module>() | |
----> 1 learn.fit(1e-2, 2, wds=wd, cycle_len=1, cycle_mult=2) | |
~/Python/FastAi-1-v2/Project/fastai/learner.py in fit(self, lrs, n_cycle, wds, **kwargs) | |
190 self.sched = None | |
191 layer_opt = self.get_layer_opt(lrs, wds) | |
--> 192 self.fit_gen(self.model, self.data, layer_opt, n_cycle, **kwargs) | |
193 | |
194 def lr_find(self, start_lr=1e-5, end_lr=10, wds=None): | |
~/Python/FastAi-1-v2/Project/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) | |
137 n_epoch = sum_geom(cycle_len if cycle_len else 1, cycle_mult, n_cycle) | |
138 fit(model, data, n_epoch, layer_opt.opt, self.crit, | |
--> 139 metrics=metrics, callbacks=callbacks, reg_fn=self.reg_fn, clip=self.clip, **kwargs) | |
140 | |
141 def get_layer_groups(self): return self.models.get_layer_groups() | |
~/Python/FastAi-1-v2/Project/fastai/model.py in fit(model, data, epochs, opt, crit, metrics, callbacks, **kwargs) | |
83 batch_num += 1 | |
84 for cb in callbacks: cb.on_batch_begin() | |
---> 85 loss = stepper.step(V(x),V(y)) | |
86 avg_loss = avg_loss * avg_mom + loss * (1-avg_mom) | |
87 debias_loss = avg_loss / (1 - avg_mom**batch_num) | |
~/Python/FastAi-1-v2/Project/fastai/model.py in step(self, xs, y) | |
38 def step(self, xs, y): | |
39 xtra = [] | |
---> 40 output = self.m(*xs) | |
41 if isinstance(output,(tuple,list)): output,*xtra = output | |
42 self.opt.zero_grad() | |
~/anaconda3/envs/fastAi-1-v2/lib/python3.6/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs) | |
222 for hook in self._forward_pre_hooks.values(): | |
223 hook(self, input) | |
--> 224 result = self.forward(*input, **kwargs) | |
225 for hook in self._forward_hooks.values(): | |
226 hook_result = hook(self, input, result) | |
~/Python/FastAi-1-v2/Project/fastai/column_data.py in forward(self, users, items) | |
183 um = self.u(users)* self.i(items) | |
184 res = um.sum(1) + self.ub(users).squeeze() + self.ib(items).squeeze() | |
--> 185 return F.sigmoid(res) * (self.max_score-self.min_score) + self.min_score | |
186 | |
187 class CollabFilterLearner(Learner): | |
~/anaconda3/envs/fastAi-1-v2/lib/python3.6/site-packages/torch/autograd/variable.py in __mul__(self, other) | |
827 | |
828 def __mul__(self, other): | |
--> 829 return self.mul(other) | |
830 __rmul__ = __mul__ | |
831 | |
~/anaconda3/envs/fastAi-1-v2/lib/python3.6/site-packages/torch/autograd/variable.py in mul(self, other) | |
340 else: | |
341 assert not torch.is_tensor(other) | |
--> 342 return MulConstant.apply(self, other) | |
343 | |
344 def mul_(self, other): | |
~/anaconda3/envs/fastAi-1-v2/lib/python3.6/site-packages/torch/autograd/_functions/basic_ops.py in forward(ctx, a, b, inplace) | |
147 return tensor.mul_(ctx.constant) | |
148 else: | |
--> 149 return tensor.mul(ctx.constant) | |
150 | |
151 @staticmetho |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment