Currently, we use Float, Int, and Boolean for our Value Type V in Tensor.
val x: Tensor[T, Float] = Tensor(shape).fromArray(5f)
Using the existing Scala Types was somewhat arbitrary. And I see several issues:
- Tensor[T, Float] implies that it is float32, however, we track the precision in the internal dtype
- Tensor[T, Float] implies that Tensor[T, Double], Tensor[T, Byte] exists, but we want to track precision only internal.
- Scala has no unsigned type like UInt, which we should support (Natural Numbers).
I suggest moving to custom types: Floating, Integer, Bool
Lets use this issue as discussion for this.
Currently, we use Float, Int, and Boolean for our Value Type V in Tensor.
Using the existing Scala Types was somewhat arbitrary. And I see several issues:
I suggest moving to custom types: Floating, Integer, Bool
Lets use this issue as discussion for this.