class_docstr: The layer that calculates cumulative sum along the given dimension.
  
  :param input_layer: The input layer and the number of its output. If no number
      is specified, the first output will be connected.
  :type input_layer: object, tuple(object, int)
  :param dimension: The dimension along which the cumulative sum is to be calculated.
  :type dimension: str, {'batch_length', 'batch_width', 'list_size', 'height', 'width',
      'depth', 'channels'}, default='channels'
  :param reverse: If True then cumulative sums will be calculated in reverse order
  :type reverse: bool, default=False
  :param name: The layer name.
  :type name: str, default=None
  
  .. rubric:: Layer inputs:
  
  (1) a data blob of any size and data type
  
  .. rubric:: Layer outputs:
  
  (1) a blob of the same size and data type with the cumulative sums
docstr: Sets the dimension along which the cumulative sum is to be calculated.
          
docstr_tok: ["Sets","the","dimension","along","which","the","cumulative","sum","is","to","be","calculated","."]
code: def dimension(self, dimension):
      """Sets the dimension along which the cumulative sum is to be calculated."""
      dimension_index = self.dimensions.index(dimension)
  
      self._internal.set_dimension(dimension_index)
  
file_path: neoml/NeoML/Python/neoml/Dnn/CumSum.py
imports: import neoml.PythonWrapper
  from .Dnn import Layer
  from neoml.Utils import check_input_layers
label_desc: Use image node_id 3 for calling the CumSum obj's underlying member method code with example usage: obj.dimension(dimension) without return types