Unet_binary segmentation

For the new API I am getting the same error with

data = (SegmentationItemList.from_folder(path_img,div=True) 
    .random_split_by_pct()
    .label_from_func(get_y_fn, classes=codes,div=True) #This method is primarly intended for inputs that are filenames, but could work in other settings.
    .transform(get_transforms(), tfm_y=True, size=128)
    .databunch())

I have passed in div in two places, for the images and masks yet this is happening. What is the fix now?

Fixed: I tried @Mirodil’s code and it gave me TypeError: ‘bool’ object is not callable , so use that code but pass div=True not just True in SegmentationItemList.from_folder.

My model is training but can view more than a few examples in the example viewer