ndsampler.abstract_sampler
¶
Module Contents¶
Classes¶
API for Samplers, not all methods need to be implemented depending on the |
- class ndsampler.abstract_sampler.AbstractSampler¶
Bases:
object
API for Samplers, not all methods need to be implemented depending on the use case (for example, load_sample may not be defined if positive / negative cases are generated on the fly).
- property class_ids(self)¶
- abstract lookup_class_name(self, class_id)¶
- abstract lookup_class_id(self, class_name)¶
- abstract load_sample(self, tr, pad=None, window_dims=None, visible_thresh=0.1)¶
- property n_positives(self)¶
- abstract load_item(self, index, pad=None, window_dims=None)¶
- abstract load_positive(self, index=None, pad=None, window_dims=None, rng=None)¶
- abstract load_negative(self, index=None, pad=None, window_dims=None, rng=None)¶
- abstract load_image(self, image_id)¶
- abstract image_ids(self)¶
- abstract preselect(self, **kwargs)¶
Setup a pool of training examples before the epoch begins