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

Method eye

src/python/lfs/py_tensor.cpp:1496–1503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1494 }
1495
1496 PyTensor PyTensor::eye(int64_t n, const std::string& device,
1497 const std::string& dtype) {
1498 auto t = Tensor::eye(static_cast<size_t>(n), parse_device(device));
1499 if (dtype != "float32") {
1500 t = t.to(parse_dtype(dtype));
1501 }
1502 return PyTensor(std::move(t));
1503 }
1504
1505 PyTensor PyTensor::eye(int64_t m, int64_t n, const std::string& device,
1506 const std::string& dtype) {

Callers 3

test_mat4_creationMethod · 0.45
test_eye_squareMethod · 0.45
test_eye_rectangularMethod · 0.45

Calls 5

parse_deviceFunction · 0.85
parse_dtypeFunction · 0.85
PyTensorClass · 0.85
moveFunction · 0.85
toMethod · 0.45

Tested by 3

test_mat4_creationMethod · 0.36
test_eye_squareMethod · 0.36
test_eye_rectangularMethod · 0.36