Python Apply Portorch For Segmentation Code