_utils ====== .. py:module:: _utils Attributes ---------- .. autoapisummary:: _utils.Strategy _utils.Queue _utils.SpatialSearch _utils.ResponsibilityStyle Exceptions ---------- .. autoapisummary:: _utils.ReXError _utils.ReXTomlError _utils.ReXPathError _utils.ReXScriptError _utils.ReXDataError _utils.ReXMapError Classes ------- .. autoapisummary:: _utils.ReXPositions Functions --------- .. autoapisummary:: _utils.update_mask_shape _utils.try_rounding _utils.find_required_prediction _utils.find_complete_prediction _utils.match_resposnibility_style _utils.try_detach _utils.one_d_permute _utils.powerset _utils.clause_area _utils.xlogx _utils._xlogx _utils.add_boundaries _utils.get_device _utils.get_map_locations _utils.set_boolean_mask_value _utils.ff _utils.version Module Contents --------------- .. py:data:: Strategy .. py:data:: Queue .. py:data:: SpatialSearch .. py:data:: ResponsibilityStyle .. py:function:: update_mask_shape(batch_size, mask_shape) .. py:class:: ReXPositions(sufficient_position=None, contrastive_position=None, sufficiency_found=False, current_max_necessity=0.0) .. py:attribute:: sufficient_position :value: None .. py:attribute:: contrastive_position :value: None .. py:attribute:: sufficiency_found :value: False .. py:attribute:: current_max_necessity :value: 0.0 .. py:method:: __repr__() .. py:method:: is_empty() .. py:function:: try_rounding(n, rounding) .. py:function:: find_required_prediction(target, threshold, insertion_predictions, contrastive_completeness_threshold = 0.0, deletion_predictions = None, rounding=None, sufficiency_found=False) .. py:function:: find_complete_prediction(target, target_confidence, insertion_predictions, rounding=2) .. py:function:: match_resposnibility_style(s) .. py:function:: try_detach(t) .. py:function:: one_d_permute(tensor) .. py:function:: powerset(r, reverse=True) .. py:function:: clause_area(clause, areas) .. py:exception:: ReXError Bases: :py:obj:`Exception` Common base class for all non-exit exceptions. .. py:exception:: ReXTomlError(message) Bases: :py:obj:`ReXError` Common base class for all non-exit exceptions. .. py:attribute:: message .. py:method:: __str__() Return str(self). .. py:exception:: ReXPathError(message) Bases: :py:obj:`ReXError` Common base class for all non-exit exceptions. .. py:attribute:: message .. py:method:: __str__() Return str(self). .. py:exception:: ReXScriptError(message) Bases: :py:obj:`ReXError` Common base class for all non-exit exceptions. .. py:attribute:: message .. py:method:: __str__() Return str(self). .. py:exception:: ReXDataError(message) Bases: :py:obj:`ReXError` Common base class for all non-exit exceptions. .. py:attribute:: message .. py:method:: __str__() Return str(self). .. py:exception:: ReXMapError(message) Bases: :py:obj:`ReXError` Common base class for all non-exit exceptions. .. py:attribute:: message .. py:method:: __str__() Return str(self). .. py:function:: xlogx(ps) .. py:function:: _xlogx(p) .. py:function:: add_boundaries(img, segs, colour=None) .. py:function:: get_device(gpu) .. py:function:: get_map_locations(map, reverse=True) .. py:function:: set_boolean_mask_value(tensor, mode, order, coords, val = True) .. py:function:: ff(obj, fmt) Like format(obj, fmt), but returns the string 'None' if obj is None. See the help for format() to see acceptable values for fmt. .. py:function:: version()