MCPcopy Create free account
hub / github.com/ai-techsystems/deepC / sum

Method sum

include/core/tensor.h:516–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514 return result;
515 }
516 T sum() const {
517 T result = 0;
518 for (size_t i = 0; i < this->length(); i++)
519 result += _mem_layout[i];
520 return result;
521 }
522
523#ifndef SWIGPYTHON
524 // \brief load tensor data from file.

Callers 6

test_createMethod · 0.45
logsoftmax_2dFunction · 0.45
test_LogSoftmax1DMethod · 0.45
softmax_2dFunction · 0.45
test_Softmax1DMethod · 0.45
computeMethod · 0.45

Calls 1

lengthMethod · 0.45

Tested by 3

test_createMethod · 0.36
test_LogSoftmax1DMethod · 0.36
test_Softmax1DMethod · 0.36