code: def forward(self, inputs):
      self.retain_inputs((0, 1))
      a, b = inputs
  
      if self.a_axes is None or self.b_axes is None:
          a_axes = [[], []]  # 0:row axes, 1:col axes
          b_axes = [[], []]  # 0:row axes, 1:col axes
          axes = self.axes
          if isinstance(axes, collections_abc.Sequence):
              a_axes[1], b_axes[0] = axes
              if numpy.isscalar(a_axes[1]):
                  a_axes[1] = (a_axes[1],)
              if numpy.isscalar(b_axes[0]):
                  b_axes[0] = (b_axes[0],)
          else:
              a_axes[1] = six.moves.range(a.ndim - axes, a.ndim)
              b_axes[0] = six.moves.range(axes)
          a_range = six.moves.range(a.ndim)
          a_axes[0] = [i for i in a_range if i not in a_axes[1]]
          b_range = six.moves.range(b.ndim)
          b_axes[1] = [i for i in b_range if i not in b_axes[0]]
          self.a_axes = a_axes
          self.b_axes = b_axes
  
      c = _tensordot(a, b, self.a_axes, self.b_axes, self.c_axes)
  
      if self.c_axes is None:
          c_axes = [[], []]  # 0:row axes, 1:col axes
          c_row_ndim = len(self.a_axes[0])
          c_col_ndim = len(self.b_axes[1])
          c_axes[0] = six.moves.range(c_row_ndim)
          c_axes[1] = six.moves.range(
              c_row_ndim, c_row_ndim + c_col_ndim
          )
          self.c_axes = c_axes
  
      return (utils.force_array(c, self.dtype),)
  
file_path: chainer/chainer/functions/math/tensordot.py
imports: import numpy
  import six
  from chainer import backend
  from chainer import function_node
  from chainer import utils
  from chainer.utils import collections_abc
  from chainer.utils import type_check
label_desc: Use image node_id 3 for calling the TensorDot obj's underlying member method code with example usage: obj.forward(inputs) and returns: utils