bwang0911 commited on
Commit
b81e646
1 Parent(s): 780526f

refactor: remove unused output_value

Browse files
Files changed (1) hide show
  1. modeling_clip.py +1 -4
modeling_clip.py CHANGED
@@ -306,10 +306,6 @@ class JinaCLIPModel(JinaCLIPPreTrainedModel):
306
  if convert_to_tensor:
307
  convert_to_numpy = False
308
 
309
- if output_value != 'sentence_embedding':
310
- convert_to_tensor = False
311
- convert_to_numpy = False
312
-
313
  input_was_string = False
314
  if isinstance(sentences, str) or not hasattr(sentences, '__len__'):
315
  sentences = [sentences]
@@ -364,6 +360,7 @@ class JinaCLIPModel(JinaCLIPPreTrainedModel):
364
  self.train(is_training)
365
  return all_embeddings
366
 
 
367
  def get_preprocess(self):
368
  if not self.preprocess:
369
  self.preprocess = AutoImageProcessor.from_pretrained(config._name_or_path, trust_remote_code=True)
 
306
  if convert_to_tensor:
307
  convert_to_numpy = False
308
 
 
 
 
 
309
  input_was_string = False
310
  if isinstance(sentences, str) or not hasattr(sentences, '__len__'):
311
  sentences = [sentences]
 
360
  self.train(is_training)
361
  return all_embeddings
362
 
363
+
364
  def get_preprocess(self):
365
  if not self.preprocess:
366
  self.preprocess = AutoImageProcessor.from_pretrained(config._name_or_path, trust_remote_code=True)