MCPcopy Create free account
hub / github.com/NVIDIA/DALI / shape_from_py

Function shape_from_py

dali/python/backend_impl.cc:122–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122TensorShape<> shape_from_py(py::tuple tup) {
123 TensorShape<> shape;
124 shape.resize(tup.size());
125 for (size_t i = 0; i < tup.size(); ++i) {
126 shape[i] = tup[i].cast<int64_t>();
127 }
128 return shape;
129}
130
131template <int ndim>
132py::list as_py_list(const TensorShape<ndim> &shape) {

Callers 1

FillTensorFromCudaArrayFunction · 0.85

Calls 2

resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected