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

Method SetField

tensorflow/lite/testing/parse_testdata.cc:335–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333 : test_runner_(test_runner), num_invocations_(0), max_invocations_(-1) {}
334 void SetMaxInvocations(int max) { max_invocations_ = max; }
335 void SetField(const std::string& name, const std::string& value) override {
336 if (name == "load_model") {
337 test_runner_->LoadModel(value);
338 } else if (name == "init_state") {
339 test_runner_->AllocateTensors();
340 for (int id : Split<int>(value, ",")) {
341 test_runner_->ResetTensor(id);
342 }
343 }
344 }
345 Message* AddChild(const std::string& s) override {
346 if (s == "invoke") {
347 test_runner_->AllocateTensors();

Callers

nothing calls this directly

Calls 3

LoadModelMethod · 0.45
AllocateTensorsMethod · 0.45
ResetTensorMethod · 0.45

Tested by

no test coverage detected