Solved by colesbury in post #2 
              
              
                The behavior is inherited from Lua Torch. With an operation involving a Python number and a Tensor, the number is cast to the Tensor’s type (which rounds 0.5 to 0 in this case). 
We plan to change the behavior in the future. It’s tracked here: