Skip to main content



mean(v: Symbol, axis: Int = -1) -> Symbol

Reduces a symbolic tensor using a mean operation.


  • v (Symbol): The input tensor for the operation.
  • axis (Int): The axis along which to compute the reduction. If negative, indexes from the last dimension, ie. a value of -1 will compute the reduction along the last dimension.


A symbolic tensor representing the result of the mean operation. The tensor will have the same rank as the input tensor, and the same shape except along the axis dimension which will have size 1.