megengine.core.tensor.array_method.ArrayMethodMixin¶
- class ArrayMethodMixin[源代码]¶
属性
alias of
transpose
.- rtype
返回自身
Tensor
的维数。Returns the size of the self
Tensor
.方法
astype
(dtype)Returns a
Tensor
with the same data and number of elements with the specifieddtype
.flatten
()See
flatten
.item
(*args)Returns the value of this
Tensor
as a standard Pythonnumbers.Number
.max
([axis, keepdims])Returns the max value of each row of the input tensor in the given dimension
axis
.mean
([axis, keepdims])Returns the mean value of each row of the input tensor in the given dimension
axis
.min
([axis, keepdims])Returns the min value of each row of the input tensor in the given dimension
axis
.numpy
()- rtype
prod
([axis, keepdims])Returns the product of each row of the input tensor in the given dimension
axis
.reshape
(*args)See
reshape
.sum
([axis, keepdims])Returns the sum of each row of the input tensor in the given dimension
axis
.tolist
()Returns the tensor as a (nested) list.
transpose
(*args)See
transpose
.