You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thank you for your implementation. I thought people might be interested in using this code with Python 3 and the whole code seems to be compatible with it, except in the following place where a division creates a small issue that might not be easy to detect :
In Python 2 a simple / work as a floor division, which is not the case in Python 3 where you have to use // instead.
Thus, by using Python 3, the coordinates of the center c for cropping are wrong and this gives this kind of tiles, without raising any errors : Original image : 9 tiles :
Tiles 8 and 9 are missing pixels (which comes from the facts that 7/3>2 and 8/3>2 hence the need to use a floor division) which will make this self-supervised task easier and won't be useful to learn interesting features for the neural network.
Using a floor division with // is also compatible with Python 2, so I think it could be useful to add this change to the current version to improve compatibility and prevent potential misuse of the codes by users with Python 3.
The text was updated successfully, but these errors were encountered:
Hi,
Thank you for your implementation. I thought people might be interested in using this code with Python 3 and the whole code seems to be compatible with it, except in the following place where a division creates a small issue that might not be easy to detect :
JigsawPuzzlePytorch/Dataset/JigsawImageLoader.py
Lines 46 to 49 in ec85994
In Python 2 a simple
/
work as a floor division, which is not the case in Python 3 where you have to use//
instead.Thus, by using Python 3, the coordinates of the center
c
for cropping are wrong and this gives this kind of tiles, without raising any errors :Original image :
9 tiles :
Tiles 8 and 9 are missing pixels (which comes from the facts that 7/3>2 and 8/3>2 hence the need to use a floor division) which will make this self-supervised task easier and won't be useful to learn interesting features for the neural network.
Using a floor division with
//
is also compatible with Python 2, so I think it could be useful to add this change to the current version to improve compatibility and prevent potential misuse of the codes by users with Python 3.The text was updated successfully, but these errors were encountered: