NohTow commited on
Commit
eb62d2f
1 Parent(s): 8560547

Remove extra forward pass

Browse files
Files changed (1) hide show
  1. model.py +0 -1
model.py CHANGED
@@ -111,7 +111,6 @@ def encode_images(images: list):
111
  return_tensors="pt",
112
  ).to(device)
113
  doc_inputs = model.prepare_inputs_for_generation(**doc_inputs, use_cache=False)
114
- output = model(**doc_inputs, return_dict=True, output_hidden_states=True)
115
  with torch.no_grad():
116
  output = model(**doc_inputs, return_dict=True, output_hidden_states=True)
117
  doc_embeddings = get_embedding(
 
111
  return_tensors="pt",
112
  ).to(device)
113
  doc_inputs = model.prepare_inputs_for_generation(**doc_inputs, use_cache=False)
 
114
  with torch.no_grad():
115
  output = model(**doc_inputs, return_dict=True, output_hidden_states=True)
116
  doc_embeddings = get_embedding(