A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.pytorch.org/docs/stable/generated/torch.outer.html below:

torch.outer — PyTorch 2.7 documentation

torch.outer
torch.outer(input, vec2, *, out=None) Tensor

Outer product of input and vec2. If input is a vector of size n n n and vec2 is a vector of size m m m, then out must be a matrix of size ( n × m ) (n \times m) (n×m).

Parameters
  • input (Tensor) – 1-D input vector

  • vec2 (Tensor) – 1-D input vector

Keyword Arguments

out (Tensor, optional) – optional output matrix

Example:

>>> v1 = torch.arange(1., 5.)
>>> v2 = torch.arange(1., 4.)
>>> torch.outer(v1, v2)
tensor([[  1.,   2.,   3.],
        [  2.,   4.,   6.],
        [  3.,   6.,   9.],
        [  4.,   8.,  12.]])
Docs

Access comprehensive developer documentation for PyTorch

View Docs Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials Resources

Find development resources and get your questions answered

View Resources

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4