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

torch_split

Split


Description

Splits the tensor into chunks. Each chunk is a view of the original tensor.

Usage

torch_split(self, split_size, dim = 1L)

Arguments

self

(Tensor) tensor to split.

split_size

(int) size of a single chunk or list of sizes for each chunk

dim

(int) dimension along which to split the tensor.

Details

If split_size is an integer type, then tensor will be split into equally sized chunks (if possible). Last chunk will be smaller if the tensor size along the given dimension dim is not divisible by split_size.

If split_size is a list, then tensor will be split into length(split_size) chunks with sizes in dim according to split_size_or_sections.


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.