MCPcopy Create free account
hub / github.com/apache/singa / Clamp

Function Clamp

src/core/tensor/tensor_math.h:137–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135/// if in[i]>high, then out[i]=high; if in[i]<low, then out[i]=low.
136template <typename DType, typename Lang>
137void Clamp(const DType low, const DType high, const Tensor &in, Tensor *out,
138 Context *ctx) {
139 LOG_FATAL("Clamp", DType, Lang);
140}
141
142/// out[i] = x / in[i]
143template <typename DType, typename Lang>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected