MCPcopy Create free account
hub / github.com/FreeformRobotics/OTS / __init__

Method __init__

dataset.py:71–83  ·  view source on GitHub ↗
(self, root_dataset, odgt, opt, batch_per_gpu=1, **kwargs)

Source from the content-addressed store, hash-verified

69
70class TrainDataset(BaseDataset):
71 def __init__(self, root_dataset, odgt, opt, batch_per_gpu=1, **kwargs):
72 super(TrainDataset, self).__init__(odgt, opt, **kwargs)
73 self.root_dataset = root_dataset
74 # down sampling rate of segm labe
75 self.segm_downsampling_rate = opt.segm_downsampling_rate
76 self.batch_per_gpu = batch_per_gpu
77
78 # classify images into two classes: 1. h > w and 2. h <= w
79 self.batch_record_list = [[], []]
80
81 # override dataset length when trainig with batch_per_gpu > 1
82 self.cur_idx = 0
83 self.if_shuffled = False
84
85 def _get_sub_batch(self):
86 while True:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected