Closed ice-cream567 closed 11 months ago
Hello, I would like to know what the following code does in the load_data function and why it is necessary to subtract 1 from the coordinate value.Thanks. if flip: x = 239 - x y = 179 - y else: x = x - 1 y = y - 1
if flip: x = 239 - x y = 179 - y else: x = x - 1 y = y - 1
Hi ice-cream567,
Thanks for your question! This is to convert the 1-indexed pixel coordinates to 0-indexed pixel coordinates.
I hope this helps! Let me know if you have further concerns.
Hello, I would like to know what the following code does in the load_data function and why it is necessary to subtract 1 from the coordinate value.Thanks.
if flip: x = 239 - x y = 179 - y else: x = x - 1 y = y - 1