class_docstr: Represents a multi-task kernel whose kernel can be separated as a product.
class_docstr_tok: ["Represents","a","multi-task","kernel","whose","kernel","can","be","separated","as","a","product","."]
code: def __init__(
      self,
      num_tasks,
      base_kernel,
      task_kernel_matrix_linop=None,
      task_kernel_scale_linop=None,
      name="Separable",
      validate_args=False,
  ):
      parameters = dict(locals())
      with tf.name_scope(name):
          if (
              task_kernel_matrix_linop is not None
              and task_kernel_scale_linop is not None
          ) or (
              task_kernel_matrix_linop is None
              and task_kernel_scale_linop is None
          ):
              raise ValueError(
                  "Expected only one of `task_kernel_matrix_linop` and "
                  "`task_kernel_scale_linop`."
              )
          if tf.nest.is_nested(base_kernel.feature_ndims):
              dtype = dtype_util.common_dtype([base_kernel], tf.float32)
              float_dtype = dtype_util.common_dtype(
                  [task_kernel_matrix_linop, task_kernel_scale_linop],
                  tf.float32,
              )
          else:
              dtype = dtype_util.common_dtype(
                  [
                      task_kernel_matrix_linop,
                      task_kernel_scale_linop,
                      base_kernel,
                  ],
                  tf.float32,
              )
              float_dtype = dtype
          self._task_kernel_matrix_linop = (
              tensor_util.convert_nonref_to_tensor(
                  task_kernel_matrix_linop,
                  float_dtype,
                  name="task_kernel_matrix_linop",
              )
          )
          self._task_kernel_scale_linop = (
              tensor_util.convert_nonref_to_tensor(
                  task_kernel_scale_linop,
                  float_dtype,
                  name="task_kernel_scale_linop",
              )
          )
          self._base_kernel = base_kernel
          super(Separable, self).__init__(
              num_tasks=num_tasks,
              dtype=dtype,
              feature_ndims=base_kernel.feature_ndims,
              name=name,
              validate_args=validate_args,
              parameters=parameters,
          )
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import nest_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math.psd_kernels import positive_semidefinite_kernel
label_desc: Use image node_id 1 to create a new Separable object from inherited base classes: MultiTaskKernel with example: obj = Separable(num_tasks, base_kernel, task_kernel_matrix_linop, task_kernel_scale_linop, name, validate_args)