random_tucker#

ivy.random_tucker(shape, rank, /, *, dtype=None, full=False, orthogonal=False, seed=None, non_negative=False)[source]#

Generate a random Tucker tensor.

Parameters:
  • shape (Sequence[int]) – shape of the tensor to generate

  • rank (Sequence[int]) – rank of the Tucker decomposition if int, the same rank is used for each mode otherwise, dimension of each mode

  • full (Optional[bool], default: False) – if True, a full tensor is returned otherwise, the decomposed tensor is returned

  • orthogonal (Optional[bool], default: False) – if True, creates a tensor with orthogonal components

  • seed (Optional[int], default: None) – seed for generating random numbers

  • non_negative (Optional[bool], default: False) –

Return type:

Union[TuckerTensor, Array]

Returns:

ivy.TuckerTensor