Skip to content

Commit

Permalink
cleanup region vit
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Nov 22, 2021
1 parent 5b2382f commit 6665fc6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions vit_pytorch/regionvit.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,7 @@ def __init__(
nn.Linear(last_dim, num_classes)
)

def forward(
self,
x,
return_local_tokens = False
):
def forward(self, x):
*_, h, w = x.shape
assert divisible_by(h, self.region_patch_size) and divisible_by(w, self.region_patch_size), 'height and width must be divisible by region patch size'
assert divisible_by(h, self.local_patch_size) and divisible_by(w, self.local_patch_size), 'height and width must be divisible by local patch size'
Expand Down

0 comments on commit 6665fc6

Please sign in to comment.