Updates floor division to use floor division operator
Summary:
Performing floor division with torch.div is deprecated and will soon throw a runtime error. This diff updates the floor division to use the floor division operator.
Created from Diffusion's 'Open in Editor' feature.
@@ -335,7 +335,7 @@ class DiverseSiblingsSearch(Search):
k,
)
- final_beams = torch.div(final_indices, k)
+ final_beams = final_indices // k
for i in range(bsz):
final_indices[i] = indices[i][final_indices[i]]
