Shortcuts

split_batch

class mmedit.models.data_preprocessors.split_batch(batch_tensor: torch.Tensor, padded_sizes: torch.Tensor)[source]

reverse operation of stack_batch.

Parameters
  • batch_tensor (Tensor) – The 4D-tensor or 5D-tensor. Tensor.dim == tensor_list[0].dim + 1

  • padded_sizes (Tensor) – The padded sizes of each tensor.

Returns

A list of tensors with the same dim.

Return type

tensor_list (List[Tensor])

Read the Docs v: zyh/doc-notfound-extend
Versions
master
latest
stable
zyh-doc-notfound-extend
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.