MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / to_tensor_shape

Function to_tensor_shape

src/python/lfs/py_tensor.cpp:1436–1443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1434 }
1435
1436 TensorShape to_tensor_shape(const std::vector<int64_t>& shape) {
1437 std::vector<size_t> dims;
1438 dims.reserve(shape.size());
1439 for (auto d : shape) {
1440 dims.push_back(static_cast<size_t>(d));
1441 }
1442 return TensorShape(dims);
1443 }
1444 } // namespace
1445
1446 // Type conversion (needs parse_dtype from anonymous namespace)

Callers 7

zerosMethod · 0.85
onesMethod · 0.85
fullMethod · 0.85
randMethod · 0.85
randnMethod · 0.85
emptyMethod · 0.85
randintMethod · 0.85

Calls 4

TensorShapeFunction · 0.50
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected