Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -94,7 +94,7 @@ def get_transform(is_train, image_size):
|
|
| 94 |
return transform
|
| 95 |
|
| 96 |
def post_process(vit_embeds, target_aspect_ratio, model_type='VIT'):
|
| 97 |
-
if model_type in ["
|
| 98 |
h = w = int(vit_embeds.shape[1] ** 0.5)
|
| 99 |
c = vit_embeds.shape[-1]
|
| 100 |
# vit_embeds_local = vit_embeds[:-1].reshape(-1, h, w, c).permute(0, 3, 1, 2)
|
|
|
|
| 94 |
return transform
|
| 95 |
|
| 96 |
def post_process(vit_embeds, target_aspect_ratio, model_type='VIT'):
|
| 97 |
+
if model_type in ["TokenFD_4096_English_seg", "TokenFD_2048_Bilingual_seg"]:
|
| 98 |
h = w = int(vit_embeds.shape[1] ** 0.5)
|
| 99 |
c = vit_embeds.shape[-1]
|
| 100 |
# vit_embeds_local = vit_embeds[:-1].reshape(-1, h, w, c).permute(0, 3, 1, 2)
|