MCPcopy Create free account
hub / github.com/alibaba/MNN / CPUNormalize

Method CPUNormalize

backupcode/cpubackend/CPUNormalize.cpp:15–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14namespace MNN {
15CPUNormalize::CPUNormalize(Backend* b, const MNN::Op* op) : MNN::Execution(b) {
16 auto normalize = op->main_as_Normalize();
17 mAcrossSpatial = normalize->acrossSpatial();
18 mChannelShared = normalize->channelShared();
19
20 mEps = normalize->eps();
21 mScale.reset(normalize->scale()->size());
22 ::memcpy(mScale.get(), normalize->scale()->data(), normalize->scale()->size() * sizeof(float));
23}
24
25ErrorCode CPUNormalize::onResize(const std::vector<Tensor*>& inputs, const std::vector<Tensor*>& outputs) {
26 auto inputTensor = inputs[0];

Callers

nothing calls this directly

Calls 6

epsMethod · 0.80
resetMethod · 0.45
sizeMethod · 0.45
scaleMethod · 0.45
getMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected