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
Thank you so much for posting your code online! I was really fascinated by your work and I presented it recently at the computer vision seminar at Stony Brook University.
I was tinkering with the implementation of DoubleColoredMNIST because I want to use it in a related project and I noticed something strange: In the class implementation, colors are assigned to global tensors and every time an image is requested, the global color tensors get jittered instead of jittering a local copy. Is this the intended implementation or is this something unintended?
If you can notice, the tensors between the two calls get changed.
This issue comes from line 87 and line 91 in mnists/dataloader.py where I assume the intended action is to copy the color tensor. What happens instead is the local variables back_color and obj_color refer to the global color tensors and they get jittered instead.
# line 87:back_color=self.background_colors[i]
...
# line 91:obj_color=self.object_colors[i]
If you add .clone() to the end of assignment, you will avoid this problem.
# line 87:back_color=self.background_colors[i].clone()
Let me know if this is actually a bug or feature of the implementation 😅
The text was updated successfully, but these errors were encountered:
hey, thanks for your question and good catch! Somehow this clone got lost, it used to be there ... It should not change the end results, but jittering it locally is the intended behavior. The code is updated, thanks for spotting this bug :)
Hi!
Thank you so much for posting your code online! I was really fascinated by your work and I presented it recently at the computer vision seminar at Stony Brook University.
I was tinkering with the implementation of DoubleColoredMNIST because I want to use it in a related project and I noticed something strange: In the class implementation, colors are assigned to global tensors and every time an image is requested, the global color tensors get jittered instead of jittering a local copy. Is this the intended implementation or is this something unintended?
Reproduction code:
If you can notice, the tensors between the two calls get changed.
This issue comes from line 87 and line 91 in
mnists/dataloader.py
where I assume the intended action is to copy the color tensor. What happens instead is the local variablesback_color
andobj_color
refer to the global color tensors and they get jittered instead.If you add
.clone()
to the end of assignment, you will avoid this problem.Let me know if this is actually a bug or feature of the implementation 😅
The text was updated successfully, but these errors were encountered: