Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 762 Bytes

variable.rst

File metadata and controls

31 lines (22 loc) · 762 Bytes

Variable and Parameter

Variable classes and utilities

chainer.Variable chainer.as_variable chainer.Parameter chainer.variable.VariableNode

N-dimensional array

chainer.Variable holds its value as an n-dimensional array (ndarray). Chainer supports the following classes:

  • numpy.ndarray, including ideep4py.mdarray
  • cupy.ndarray
  • chainerx.ndarray

Note

Python scalars (float, etc.) and NumPy scalars (numpy.float16, numpy.float32, etc.) cannot be used as chainer.Variable.array. See also chainer.utils.force_array.