Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doctr/models/classification/vip/layers/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def windows2img(self, img_splits_hw: torch.Tensor, h_sp: int, w_sp: int, h: int,
Returns:
A float tensor of shape (b, h, w, c).
"""
b_merged = int(img_splits_hw.shape[0] / (h * w / h_sp / w_sp))
b_merged = img_splits_hw.shape[0] // ((h * w) // (h_sp * w_sp))
img = img_splits_hw.view(b_merged, h // h_sp, w // w_sp, h_sp, w_sp, -1)
# contiguous() required to ensure the tensor has a contiguous memory layout
# after permute, allowing the subsequent view operation to work correctly.
Expand Down
Loading