API symbolsnnCopyCopy as MarkdownCopy page linkView MarkdownDownload .mdOpenAIOpen in ChatGPTClaudeOpen in ClaudePerplexityOpen in PerplexityGrokOpen in Grok tensorplay.nn.functional.pdist tensorplay.nn.functional.pdist(input: TensorBase, p: float = 2.0) → TensorBase[source] Computes the pairwise distance between rows of input. Returns the flattened upper triangle of the N x N distance matrix — port of aten::pdist semantics. Help improve this pageFound an error, an unclear step, or a missing example?Was this page helpful?YesNoSuggest an editReport an issuetensorplay.nn.functional.pairwise_distanceComputes the pairwise distance between input vectors.tensorplay.nn.functional.pixel_shuffleRearranges elements in a tensor of shape (*, C x r^2, H, W) to a tensor of shape (*, C, H x r, W x r) .