Update vision_tower_builder.py
Browse files- vision_tower_builder.py +1 -5
vision_tower_builder.py
CHANGED
@@ -2,9 +2,6 @@ from typing import Optional, Tuple, Union, Dict
|
|
2 |
from dataclasses import dataclass
|
3 |
from functools import partial, reduce
|
4 |
from PIL import Image
|
5 |
-
import torch
|
6 |
-
import torch.utils.checkpoint
|
7 |
-
from torch import nn
|
8 |
import os
|
9 |
from transformers.image_processing_utils import BatchFeature, get_size_dict
|
10 |
from transformers.image_transforms import (
|
@@ -20,7 +17,6 @@ from transformers.image_utils import (
|
|
20 |
to_numpy_array,
|
21 |
)
|
22 |
import numpy as np
|
23 |
-
import torch
|
24 |
import torch.nn as nn
|
25 |
import torch.nn.functional as F
|
26 |
import torch.utils.checkpoint as checkpoint
|
@@ -516,7 +512,7 @@ def build_vit(config, pt_type='origin'):
|
|
516 |
drop_path_rate=0.,
|
517 |
num_frames=config.num_frames,
|
518 |
tubelet_size=1,
|
519 |
-
use_checkpoint=
|
520 |
checkpoint_num=24,
|
521 |
return_index=config.return_idx,
|
522 |
with_ln=True, # merge vision_layernorm in it
|
|
|
2 |
from dataclasses import dataclass
|
3 |
from functools import partial, reduce
|
4 |
from PIL import Image
|
|
|
|
|
|
|
5 |
import os
|
6 |
from transformers.image_processing_utils import BatchFeature, get_size_dict
|
7 |
from transformers.image_transforms import (
|
|
|
17 |
to_numpy_array,
|
18 |
)
|
19 |
import numpy as np
|
|
|
20 |
import torch.nn as nn
|
21 |
import torch.nn.functional as F
|
22 |
import torch.utils.checkpoint as checkpoint
|
|
|
512 |
drop_path_rate=0.,
|
513 |
num_frames=config.num_frames,
|
514 |
tubelet_size=1,
|
515 |
+
use_checkpoint=False,
|
516 |
checkpoint_num=24,
|
517 |
return_index=config.return_idx,
|
518 |
with_ln=True, # merge vision_layernorm in it
|