MCPcopy Create free account
hub / github.com/CandleLabAI/PCBSegClassNet / init

Method init

src/data/dataloader.py:121–136  ·  view source on GitHub ↗
(self, images, masks)

Source from the content-addressed store, hash-verified

119 return image, one_hot_map
120
121 def init(self, images, masks):
122 ds = tf.data.Dataset.from_tensor_slices((images, masks))
123 if self.opt["use_shuffle"]:
124 ds = (
125 ds.shuffle(len(images))
126 .map(self.parse_data, num_parallel_calls=AUTOTUNE)
127 .batch(self.opt["batch_size"], drop_remainder=True)
128 .prefetch(AUTOTUNE)
129 )
130 else:
131 ds = (
132 ds.map(self.parse_data, num_parallel_calls=AUTOTUNE)
133 .batch(self.opt["batch_size"], drop_remainder=True)
134 .prefetch(AUTOTUNE)
135 )
136 return ds
137
138
139class LoadClassData:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected