Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

torch_meshgrid

Meshgrid


Description

Meshgrid

Usage

torch_meshgrid(tensors)

Arguments

tensors

(list of Tensor) list of scalars or 1 dimensional tensors. Scalars will be treated (1,).

TEST

Take N tensors, each of which can be either scalar or 1-dimensional vector, and create N N-dimensional grids, where the i th grid is defined by expanding the i th input over dimensions defined by other inputs.

Examples

if (torch_is_installed()) {

x = torch_tensor(c(1, 2, 3))
y = torch_tensor(c(4, 5, 6))
out = torch_meshgrid(list(x, y))
out
}

torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.