I ran into a bug (in my script, not in DAPHNE itself) that could have been prevented with a compiler warning. The following returned 0 instead of 1 because of unintentional behavior due to wrong data types used:
N = nrow(X); # in my case N is 20
batch_size = 128;
iters = ceil(N / batch_size);
Since the division already returned 0 due to integer types used, ceil() did not have any effect. I worked around the problem with batch_size = 128.0;.
The compiler could have warned me about the situation. Either on integer division or on putting integer into ceil().
I ran into a bug (in my script, not in DAPHNE itself) that could have been prevented with a compiler warning. The following returned 0 instead of 1 because of unintentional behavior due to wrong data types used:
Since the division already returned 0 due to integer types used,
ceil()
did not have any effect. I worked around the problem withbatch_size = 128.0;
. The compiler could have warned me about the situation. Either on integer division or on putting integer intoceil()
.