IntTensor

class IntTensor

An int tensor, which stores its underlying data in an int array and tracks the strides needed to access data for each dimension.

Types

Companion
Link copied to clipboard
object Companion

Functions

at
Link copied to clipboard
fun at(pos: Int): Int
flatten
Link copied to clipboard
fun flatten(startDim: Int = 0, endDim: Int = rank - 1): IntTensor
get
Link copied to clipboard
operator fun get(index: Int): IntTensor
normalize
Link copied to clipboard
open fun normalize(): IntTensor

Return an equivalent tensor whose representation is an IntTensor with natural layout and zero offset (that is, with a contiguous data representation).

reshape
Link copied to clipboard
fun reshape(newShape: Shape): IntTensor
view
Link copied to clipboard
fun view(index: Int, axis: Int): IntTensor

Properties

dataIterator
Link copied to clipboard
val dataIterator: Iterable<Int>
rank
Link copied to clipboard
val rank: Int
shape
Link copied to clipboard
val shape: Shape
size
Link copied to clipboard
val size: Int