()
| 216 | image_path, label_path = context.get_path_pairs() |
| 217 | |
| 218 | def reader(): |
| 219 | if len(image_path) % (batch_size * gpu_num) != 0: |
| 220 | length = (len(image_path) // (batch_size * gpu_num)) * (batch_size * gpu_num) |
| 221 | else: |
| 222 | length = len(image_path) |
| 223 | for i in range(length): |
| 224 | if i == 0: |
| 225 | cc = list(zip(image_path, label_path)) |
| 226 | random.shuffle(cc) |
| 227 | image_path[:], label_path[:] = zip(*cc) |
| 228 | yield image_path[i], label_path[i], context |
| 229 | if xmap: |
| 230 | return paddle.reader.xmap_readers(context_mapper_train, reader, 4, 32) |
| 231 | else: |
nothing calls this directly
no outgoing calls
no test coverage detected