So, fairly basic question here. If I want to just do a raw prediction using the model input on a tensor, I should be able to do the following yes? (on a tabular model):
input = data.train_ds.x.data learn.model(input, input)
But I get an error saying there’s too many indices for my embeddings… thoughts? Did I miss something?
/usr/local/lib/python3.6/dist-packages/fastai/tabular/models.py in <listcomp>(.0) 29 def forward(self, x_cat:Tensor, x_cont:Tensor) -> Tensor: 30 if self.n_emb != 0: ---> 31 x = [e(x_cat[:,i]) for i,e in enumerate(self.embeds)] 32 x = torch.cat(x, 1) 33 x = self.emb_drop(x) IndexError: too many indices for tensor of dimension 1