MCPcopy Create free account
hub / github.com/NVIDIA/DALI / RunForCocoCpu

Method RunForCocoCpu

dali/operators/ssd/box_encoder_test.cc:32–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30 vector<float> anchors_;
31
32 void RunForCocoCpu(const vector<float> &anchors, float criteria, bool offset = false) {
33 this->SetBatchSize(coco_batch_size);
34 this->AddExternalInputs({{"bboxes", &this->boxes_}, {"labels", &this->labels_}});
35 this->AddSingleOp(OpSpec("BoxEncoder")
36 .AddArg("device", "cpu")
37 .AddArg("criteria", criteria)
38 .AddArg("anchors", anchors)
39 .AddArg("offset", offset)
40 .AddArg("scale", 300.0f)
41 .AddArg("stds", std::vector<float>({0.1f, 0.1f, 0.2f, 0.2f}))
42 .AddInput("bboxes", StorageDevice::CPU)
43 .AddInput("labels", StorageDevice::CPU)
44 .AddOutput("encoded_bboxes", StorageDevice::CPU)
45 .AddOutput("encoded_labels", StorageDevice::CPU));
46
47 dali::Workspace ws;
48 this->RunOperator(&ws);
49 this->CheckAnswersForCocoOnCpu(&ws, offset);
50 }
51
52 void RunForCocoGpu(const vector<float> &anchors, float criteria, bool offset = false) {
53 this->SetBatchSize(coco_batch_size);

Callers 1

TYPED_TESTFunction · 0.80

Calls 7

SetBatchSizeMethod · 0.80
AddSingleOpMethod · 0.80
AddOutputMethod · 0.80
RunOperatorMethod · 0.80
OpSpecClass · 0.50
AddExternalInputsMethod · 0.45

Tested by

no test coverage detected