Skip to content

Commit

Permalink
Improve Robustness on CPU machines
Browse files Browse the repository at this point in the history
  • Loading branch information
lolipopshock committed Oct 23, 2021
1 parent 28bf44c commit b4c2e7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vila/predictors.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def predict(self, pdf_data) -> lp.Layout:
return self.postprocess_model_outputs(pdf_data, model_inputs, model_predictions)

def get_category_prediction(self, model_outputs):
predictions = model_outputs.logits.argmax(dim=-1).cpu().numpy()
predictions = model_outputs.logits.argmax(dim=-1).cpu().detach().numpy()
return predictions

def preprocess_pdf_data(self, pdf_data):
Expand Down

0 comments on commit b4c2e7f

Please sign in to comment.