| 363 | } |
| 364 | |
| 365 | py::object Tensor::cuda() const |
| 366 | { |
| 367 | nvcv::TensorData tensorData = m_impl.exportData(); |
| 368 | |
| 369 | // Note: we can't cache the returned ExternalBuffer because it is holding |
| 370 | // a reference to us. Doing so would lead to mem leaks. |
| 371 | return ToPython(tensorData, py::cast(this->shared_from_this())); |
| 372 | } |
| 373 | |
| 374 | std::ostream &operator<<(std::ostream &out, const Tensor &tensor) |
| 375 | { |