File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 66setup (
77 name = 'vit-pytorch' ,
88 packages = find_packages (exclude = ['examples' ]),
9- version = '1.11.2 ' ,
9+ version = '1.11.3 ' ,
1010 license = 'MIT' ,
1111 description = 'Vision Transformer (ViT) - Pytorch' ,
1212 long_description = long_description ,
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ def __init__(
4343 def forward (
4444 self ,
4545 video , # (b c t h w)
46- eval_with_no_grad = False
46+ eval_with_no_grad = False ,
47+ forward_kwargs = dict ()
4748 ):
4849 add_time_pos_emb = self .add_time_pos_emb
4950 time = video .shape [2 ]
@@ -67,7 +68,7 @@ def forward(
6768 context = torch .no_grad if eval_with_no_grad else nullcontext
6869
6970 with context ():
70- outputs = func (video )
71+ outputs = func (video , ** forward_kwargs )
7172
7273 # handle multiple outputs, say logits and embeddings returned from extractor - also handle some reduce aux loss being returned
7374
You can’t perform that action at this time.
0 commit comments