Skip to content

Commit

Permalink
Refactor masking input logic
Browse files Browse the repository at this point in the history
  • Loading branch information
anwai98 committed Nov 15, 2023
1 parent 811e10a commit 7134550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion micro_sam/training/sam_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def _get_updated_points_per_mask_per_subiter(self, masks, sampled_binary_y, batc

if self.mask_prob > 0:
# using mask inputs for iterative prompting while training, with a probability
use_mask_inputs = True if random.random() < self.mask_prob else False
use_mask_inputs = (random.random() < self.mask_prob)
if use_mask_inputs:
_inp["mask_inputs"] = logits
else: # remove previously existing mask inputs to avoid using them in next sub-iteration
Expand Down

0 comments on commit 7134550

Please sign in to comment.