Skip to content

Commit

Permalink
fix: visiontransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeSodahub committed Nov 21, 2022
1 parent 8a36b8a commit cf9595d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions server/clip_server/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,15 @@ def __init__(self, layers: int, dtype: torch.dtype = torch.float32, **kwargs):


class VisionTransformer(_VisionTransformer):
def __init__(self, dtype: torch.dtype = torch.float32, **kwargs):
super().__init__(**kwargs)
def __init__(
self,
image_size: int,
patch_size: int,
output_dim: int,
dtype: torch.dtype = torch.float32,
**kwargs,
):
super().__init__(image_size, patch_size, output_dim=output_dim, **kwargs)
self.transformer = Transformer(dtype=dtype, **kwargs)


Expand Down

0 comments on commit cf9595d

Please sign in to comment.