Hi again,
You are right about the stuff you are complaining about, but due to millions of times of minor changes, some sections of code does not mean anything/not the best way to implement.

I started with Variable and did not change that, will remove in latter versions of this code.
I thought maybe the network tends to give intermediary outputs (0.5 when in between 0-1) since I do not punish the intermediary losses that much. Sigmoid type of “custom” loss penalizes the big mistakes not much than the smaller mistakes, but that didnot work either. That was just a trial, I normally use cross entropy.
Rounding is only in testing which I created like: if the regressed output is closer to 1, predict 1, otherwise predict 0. So they are not binary in training.
L1 might not be the best loss in testing I know, but when I test the sample with the method I explained, the loss is either 1 or 0 (it can be thought as the accuracy). You can think this one as a not-the-best implementation of accuracy.

Some of the parts are just written so fast that I did not created the optimal structure, but even so, I think that should work fine.