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

Method parameters

tensorflow/core/profiler/internal/tfprof_node.h:657–676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655 }
656
657 int64 parameters() const {
658 if (!shape().empty()) {
659 int64 params = 1;
660 bool complete_shape = true;
661 for (int64 d : shape()) {
662 // Sometimes parameters could be <0 when a dim is unknown.
663 if (d < 0) {
664 complete_shape = false;
665 break;
666 }
667 params *= d;
668 }
669 if (complete_shape) {
670 return params;
671 } else {
672 fprintf(stderr, "Incomplete shape.\n");
673 }
674 }
675 return 0;
676 }
677
678 int64 float_ops(int64 step) const {
679 // If not run, return static analysis.

Callers 15

DeserializeCompiledModelFunction · 0.45
CompileMethod · 0.45
XlaCompiledProgramShapeFunction · 0.45
TESTFunction · 0.45
TEST_FFunction · 0.45
TESTFunction · 0.45
CompileMethod · 0.45
GenArgMethodsFunction · 0.45
GenVariableMethodsFunction · 0.45
TESTFunction · 0.45
TEST_FFunction · 0.45
HumanStringMethod · 0.45

Calls 2

shapeFunction · 0.50
emptyMethod · 0.45

Tested by 8

XlaCompiledProgramShapeFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
MakeFakeArgumentsOrDieFunction · 0.36
ProgramShapesEqualFunction · 0.36