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

Function TestClamp

tensorflow/core/kernels/quantized_instance_norm_test.cc:162–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void TestClamp() {
163 Tensor input_tensor(DT_QUINT8, {1, 4, 4, 32});
164 auto input = input_tensor.flat<quint8>();
165 input = input.random(Eigen::internal::UniformRandomGenerator<quint8>());
166
167 // Tests that negative outputs are clamped at 0.0, as the output range is
168 // given to be (0.0, 1.0).
169 Expect(input_tensor, -10.0f, 10.0f, true, 0.0f, 1.0f);
170}
171
172} // namespace
173} // namespace ops

Callers 1

TEST_FFunction · 0.85

Calls 1

ExpectFunction · 0.70

Tested by

no test coverage detected