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

Function check_range

tests/test_tensor_random.cpp:116–124  ·  view source on GitHub ↗

Helper to check if values are in expected range

Source from the content-addressed store, hash-verified

114
115 // Helper to check if values are in expected range
116 bool check_range(const Tensor& tensor, float min, float max) {
117 auto values = tensor.to_vector();
118 for (float val : values) {
119 if (val < min || val > max) {
120 return false;
121 }
122 }
123 return true;
124 }
125
126 // Helper to compute mean and std
127 std::pair<float, float> compute_stats(const Tensor& tensor) {

Callers 1

TEST_FFunction · 0.85

Calls 1

to_vectorMethod · 0.80

Tested by

no test coverage detected