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

Method rand

src/python/lfs/py_tensor.cpp:1515–1519  ·  view source on GitHub ↗

Random tensor creation

Source from the content-addressed store, hash-verified

1513
1514 // Random tensor creation
1515 PyTensor PyTensor::rand(const std::vector<int64_t>& shape,
1516 const std::string& device,
1517 const std::string& dtype) {
1518 return PyTensor(Tensor::rand(to_tensor_shape(shape), parse_device(device), parse_dtype(dtype)));
1519 }
1520
1521 PyTensor PyTensor::randn(const std::vector<int64_t>& shape,
1522 const std::string& device,

Callers

nothing calls this directly

Calls 4

PyTensorClass · 0.85
to_tensor_shapeFunction · 0.85
parse_deviceFunction · 0.85
parse_dtypeFunction · 0.85

Tested by

no test coverage detected