trw.layers.sub_tensor

Module Contents

Classes

SubTensor

Select a region of a tensor (without copy), excluded the first component (N)

class trw.layers.sub_tensor.SubTensor(min_indices: Sequence[int], max_indices_exclusive: Sequence[int])

Bases: torch.nn.Module

Select a region of a tensor (without copy), excluded the first component (N)

forward(self, x: torch.Tensor) torch.Tensor