Hello, am receiving this error with some fastai custom classes.
Have not discovered where to try to squeeze the target.
In case you are familiar with the package it involves ColumnModelData and
a StructuredLearner with CrossEntropyLoss.

  
      github.com
  
  
    fastai/fastai/blob/master/fastai/column_data.py 6
from .imports import *
from .torch_imports import *
from .dataset import *
from .learner import *


class PassthruDataset(Dataset):
    def __init__(self,*args, is_reg=True):
        *xs,y=args
        self.xs,self.y = xs,y
        self.is_reg = is_reg

    def __len__(self): return len(self.y)
    def __getitem__(self, idx): return [o[idx] for o in self.xs] + [self.y[idx]]

    @classmethod
    def from_data_frame(self, df, cols_x, col_y, is_reg=True):
        cols = [df[o] for o in cols_x+[col_y]]
        return self(*cols, is_reg=is_reg)



  This file has been truncated. show original

  
  
    
    
  
  


Not sure this is the error type but it is my top suspect.