My Device: Mac m1 pro
torch==1.11.0 (I tried 2.0.0 but it failed, someone suggest to downgrade but still doesn’t work)
content_transform = transforms.Compose([ transforms.Resize([224, 224]), transforms.ToTensor(), transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) ]) # img: PIL.Image img = content_transform(img)
pdb.set_trace for debugging purposes, I determined that the segmentation fault was caused by the code located within
img = img.permute((2, 0, 1)).contiguous()
I am unable to identify the cause of the issue and would appreciate any assistance in resolving it.