The function round
internally calls the corresponding function of the library torch or tensorflow (depending on the type of input gpu.matrix-class).
The behaveour of the function mimics the 'base' function round
. Note that for rounding off a 5, the function will consider "go to the even digit". Therefore, round(2.5) = 2
and round(3.5) = 4
. For more details see round
, and torch_round
.
If the input gpu.matrix-class object is stored on the GPU, then the operations will be performed on the GPU. See gpu.matrix
.