There are at least a couple inconsistencies with torch.arange().
In PyTorch:
Passing a start value without an end value generates the range [0, start). That is convenient in the same way that seq(x) is convenient.
Passing all integer values for start, end and step (which should default to 1L in R, not 1) yields an int64 tensor, not a float tensor, unless overridden by dtype. In principle, R torch could be even smarter, and infer that arguments are meant to be integer (like seq() does), but having it work for formal integers would be a great start.
In other words, it would be nice if these were TRUE:
There are at least a couple inconsistencies with
torch.arange()
.In PyTorch:
start
value without anend
value generates the range[0, start)
. That is convenient in the same way thatseq(x)
is convenient.start
,end
andstep
(which should default to1L
in R, not1
) yields an int64 tensor, not a float tensor, unless overridden bydtype
. In principle, R torch could be even smarter, and infer that arguments are meant to be integer (likeseq()
does), but having it work for formal integers would be a great start.In other words, it would be nice if these were
TRUE
: