Open3D (C++ API)
0.17.0
|
#include <RaggedTensor.h>
Public Member Functions | |
RaggedTensor () | |
RaggedTensor (torch::Tensor values, torch::Tensor row_splits) | |
Constructor for creating RaggedTensor with values and row_splits. More... | |
c10::intrusive_ptr< RaggedTensor > | FromRowSplits (torch::Tensor values, torch::Tensor row_splits, bool validate=true) const |
torch::Tensor | GetValues () const |
Returns _values tensor. More... | |
torch::Tensor | GetRowSplits () const |
Returns _row_splits tensor. More... | |
std::string | ToString () const |
Returns string representation. More... | |
torch::Tensor | GetItem (int key) const |
int64_t | Len () const |
c10::intrusive_ptr< RaggedTensor > | Clone () const |
Copy Tensor to the same device. More... | |
c10::intrusive_ptr< RaggedTensor > | Concat (c10::intrusive_ptr< RaggedTensor > r_tensor, int64_t axis) const |
template<typename T > | |
c10::intrusive_ptr< RaggedTensor > | Add (T value) const |
template<typename T > | |
c10::intrusive_ptr< RaggedTensor > | Add_ (T value) |
template<typename T > | |
c10::intrusive_ptr< RaggedTensor > | Sub (T value) const |
template<typename T > | |
c10::intrusive_ptr< RaggedTensor > | Sub_ (T value) |
template<typename T > | |
c10::intrusive_ptr< RaggedTensor > | Mul (T value) const |
template<typename T > | |
c10::intrusive_ptr< RaggedTensor > | Mul_ (T value) |
template<typename T > | |
c10::intrusive_ptr< RaggedTensor > | Div (T value) const |
template<typename T > | |
c10::intrusive_ptr< RaggedTensor > | Div_ (T value) |
template<typename T > | |
c10::intrusive_ptr< RaggedTensor > | FloorDiv (T value) const |
template<typename T > | |
c10::intrusive_ptr< RaggedTensor > | FloorDiv_ (T value) |
A RaggedTensor is a tensor with ragged dimensions, whose slice may have different lengths. We define a container for ragged tensor to support operations involving batches whose elements may have different shape.
|
inline |
|
inline |
Constructor for creating RaggedTensor with values and row_splits.
|
inline |
|
inline |
c10::intrusive_ptr< RaggedTensor > RaggedTensor::Clone | ( | ) | const |
Copy Tensor to the same device.
c10::intrusive_ptr< RaggedTensor > RaggedTensor::Concat | ( | c10::intrusive_ptr< RaggedTensor > | r_tensor, |
int64_t | axis | ||
) | const |
|
inline |
|
inline |
|
inline |
|
inline |
c10::intrusive_ptr< RaggedTensor > RaggedTensor::FromRowSplits | ( | torch::Tensor | values, |
torch::Tensor | row_splits, | ||
bool | validate = true |
||
) | const |
Creates a RaggedTensor with rows partitioned by row_splits.
The returned RaggedTensor
corresponds with the python list defined by:
torch::Tensor RaggedTensor::GetItem | ( | int | key | ) | const |
Pythonic getitem for RaggedTensor.
Returns a slice of values based on row_splits. It can be used to retrieve i'th batch element. Currently it only supports a single integer index.
torch::Tensor RaggedTensor::GetRowSplits | ( | ) | const |
Returns _row_splits tensor.
torch::Tensor RaggedTensor::GetValues | ( | ) | const |
Returns _values tensor.
int64_t RaggedTensor::Len | ( | ) | const |
Pythonic len for RaggedTensor.
Returns number of batch elements.
|
inline |
|
inline |
|
inline |
|
inline |
std::string RaggedTensor::ToString | ( | ) | const |
Returns string representation.