class_docstr: Contrastive loss function.
class_docstr_tok: ["Contrastive","loss","function","."]
code: def check_type_forward(self, in_types):
      type_check._argname(in_types, ("x0", "x1", "y"))
  
      x0_type, x1_type, y_type = in_types
      type_check.expect(
          x0_type.dtype.kind == "f",
          x0_type.dtype == x1_type.dtype,
          y_type.dtype.kind == "i",
          x0_type.shape == x1_type.shape,
          x1_type.shape[0] == y_type.shape[0],
          x1_type.shape[0] > 0,
          x0_type.ndim == 2,
          x1_type.ndim == 2,
          y_type.ndim == 1,
      )
  
file_path: chainer/chainer/functions/loss/contrastive.py
imports: from chainer import backend
  from chainer import function_node
  import chainer.functions
  from chainer.utils import type_check
label_desc: Use image node_id 2 for calling the Contrastive obj's underlying member method code with example usage: obj.check_type_forward(in_types) without return types