'name 'read_data' is not defined - training data for NN

I'm facing this error. " name 'read_data' is not defined" . My system version is "3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)] " Not able to find which module to install or what is the alternative.

for epoch in range(nepochs):
        shuffle(train_paths) 
        out_imgs= np.zeros((16,)+(256,256)+(1,)) 
        out_masks= np.zeros((16,)+(256,256)+(1,))


    for i, img_mask_path in enumerate(train_paths):

        img, mask= read_data(img_mask_path)
        out_imgs[i,...]= img #create single array of images
        out_masks[i,...]= mask #create single array of masks
    loss = model.train_on_batch(out_imgs, out_masks) 


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source