class_docstr: Online summarization of a sequence of scalars.
  
  Summary computes the statistics of given scalars online.
class_docstr_tok: ["Online","summarization","of","a","sequence","of","scalars",".","Summary","computes","the","statistics","of","given","scalars","online","."]
docstr: Adds a scalar value.
  
  Args:
      value: Scalar value to accumulate. It is either a NumPy scalar or
          a zero-dimensional array (on CPU or GPU).
      weight: An optional weight for the value. It is a NumPy scalar or
          a zero-dimensional array (on CPU or GPU).
          Default is 1 (integer).
code: def add(self, value, weight=1):
      """Adds a scalar value.
  
      Args:
          value: Scalar value to accumulate. It is either a NumPy scalar or
              a zero-dimensional array (on CPU or GPU).
          weight: An optional weight for the value. It is a NumPy scalar or
              a zero-dimensional array (on CPU or GPU).
              Default is 1 (integer).
  
      """
      if isinstance(value, chainerx.ndarray):
          # ChainerX arrays does not support inplace assignment if it's
          # connected to the backprop graph.
          value = value.as_grad_stopped()
  
      with chainer.using_device(backend.get_device_from_array(value)):
          self._x += weight * value
          self._x2 += weight * value * value
          self._n += weight
  
imports: from __future__ import absolute_import
  import collections
  import contextlib
  import copy
  import json
  import threading
  import typing
  import warnings
  import numpy
  import six
  import chainer
  from chainer import backend
  from chainer import configuration
  from chainer import serializer
  from chainer import variable
  import chainerx
label_desc: Use image node_id 2 for calling the Summary obj's underlying member method code with example usage: obj.add(value, weight) without return types