Open Naruto-Sasuke opened 6 years ago
This does not make sense to me:
self.x_diff:resize(4, H - 1, W - 1)
self.y_diff:resize(4, H - 1, W - 1)
I assume the sizes should match the input, except for H-1 ja W-1:
self.x_diff:resize(N, C, H - 1, W - 1)
self.y_diff:resize(N, C, H - 1, W - 1)
I see that Justin's original code has
self.x_diff:resize(3, H - 1, W - 1)
which makes sense because the code assumes that RGB images are used (C is always 3).
Wow, you are right. Your code works as expected. I wonder whether it is nicer to change the original code to
self.x_diff:resize(C, H - 1, W - 1)
self.y_diff:resize(C, H - 1, W - 1)
I am wondering whether the code does the correct stuff.