Skip to content

Commit

Permalink
Update dropout.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ChongQingNoSubway authored Apr 28, 2024
1 parent 82b46cb commit 221528e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WSI/models/dropout.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def generate_mask(self,importance,input):
#print(interpolation)
mask = torch.zeros_like(importance)
mask = mask.to(input.device)
_, indx = torch.sort(importance,dim=0,descending=True)
_, indx = torch.sort(importance,dim=0)
#print(indx)
idx = indx.view(-1)
mask.index_add_(0,idx,interpolation)
Expand Down

0 comments on commit 221528e

Please sign in to comment.