viewAs

abstract fun Tensor<T>.viewAs(other: StructureND<T>): Tensor<T>(source)

View this tensor as the same size as other. this.viewAs(other) is equivalent to this.view(other.shape). For more information: https://pytorch.org/cppdocs/notes/tensor_indexing.html

Return

the result tensor with the same size as other.

Parameters

other

the result tensor has the same size as other.