bwang0911 commited on
Commit
820eec2
1 Parent(s): e03d74b

Update custom_st.py (#26)

Browse files

- Update custom_st.py (7bdc094a477b938edefeb64c540f9e518c5f7a8c)

Files changed (1) hide show
  1. custom_st.py +1 -2
custom_st.py CHANGED
@@ -100,10 +100,9 @@ class Transformer(nn.Module):
100
  self.jina_clip.config.tokenizer_class = self.tokenizer.__class__.__name__
101
 
102
  def forward(
103
- self, features: Dict[str, torch.Tensor], task_type: Optional[str] = None
104
  ) -> Dict[str, torch.Tensor]:
105
  """Returns token_embeddings, cls_token"""
106
- print("task_type in the custom Transformer:", task_type)
107
  if "input_ids" in features:
108
  embedding = self.jina_clip.get_text_features(
109
  input_ids=features["input_ids"]
 
100
  self.jina_clip.config.tokenizer_class = self.tokenizer.__class__.__name__
101
 
102
  def forward(
103
+ self, features: Dict[str, torch.Tensor]
104
  ) -> Dict[str, torch.Tensor]:
105
  """Returns token_embeddings, cls_token"""
 
106
  if "input_ids" in features:
107
  embedding = self.jina_clip.get_text_features(
108
  input_ids=features["input_ids"]