Sort data items in descending order, which I suspect will improve performance because we will hit GC less
This commit is contained in:
parent
d18aec793a
commit
62475005e4
|
@ -185,7 +185,7 @@ class ExtensibleTrainer(BaseModel):
|
|||
|
||||
sort_key = opt_get(self.opt, ['train', 'sort_key'], None)
|
||||
if sort_key is not None:
|
||||
sort_indices = torch.sort(data[sort_key]).indices
|
||||
sort_indices = torch.sort(data[sort_key], descending=True).indices
|
||||
else:
|
||||
sort_indices = None
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user