MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / size

Method size

lesson6-Segmentation/SegDataset.h:19–21  ·  view source on GitHub ↗

Return the length of data

Source from the content-addressed store, hash-verified

17 torch::data::Example<> get(size_t index) override;
18 // Return the length of data
19 torch::optional<size_t> size() const override {
20 return list_labels.size();
21 };
22private:
23 void draw_mask(std::string json_path, cv::Mat &mask);
24 int resize_width = 512; int resize_height = 512;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected