MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetMaximumAbsolute

Function GetMaximumAbsolute

tensorflow/core/kernels/spectrogram_test.cc:174–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172
173template <class Sample>
174double GetMaximumAbsolute(const std::vector<std::vector<Sample>>& spectrogram) {
175 double max_absolute = 0.0;
176 for (int i = 0; i < spectrogram.size(); ++i) {
177 for (int j = 0; j < spectrogram[i].size(); ++j) {
178 double absolute_value = std::abs(spectrogram[i][j]);
179 if (absolute_value > max_absolute) {
180 max_absolute = absolute_value;
181 }
182 }
183 }
184 return max_absolute;
185}
186
187template <class ExpectedSample, class ActualSample>
188void CompareMagnitudeData(

Callers 1

TESTFunction · 0.85

Calls 2

absClass · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected