I am using the latest version of torchvision. And I find the function transform_center_crop and transform_random_resized_crop are not working as expected (i.e., wrong output size or Input and output sizes should be greater than 0 error).
After a little digging, it seems that the problem is related to the issue #45 #44. The fix #46 back then, size <- get_image_size(img) image_width <- size[2] image_height <- size[1] is corresponding to an earlier version of get_image_size (without rev), where it has been changed in commit. In this case, I would recommend a simple fix - fallback wrt fix #46 in commit to comply with function get_image_size.magick-image (i.e., 1 - width, 2 - height).
I am using the latest version of torchvision. And I find the function transform_center_crop and transform_random_resized_crop are not working as expected (i.e., wrong output size or Input and output sizes should be greater than 0 error).
After a little digging, it seems that the problem is related to the issue #45 #44. The fix #46 back then,
size <- get_image_size(img) image_width <- size[2] image_height <- size[1]
is corresponding to an earlier version of get_image_size (withoutrev
), where it has been changed in commit. In this case, I would recommend a simple fix - fallback wrt fix #46 in commit to comply with function get_image_size.magick-image (i.e., 1 - width, 2 - height).