Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running command from README for benchmarking inference latency #6

Open
revanthky opened this issue Aug 6, 2020 · 0 comments
Open

Comments

@revanthky
Copy link

Hello,

I was able to follow the README to run the evaluation on the Bert and EBert models using the provided checkpoints. When I moved into the profiling section, I successfully ran the flop profiling as well as the inference latency benchmarking for the Ebert model. However, there was an error when I tried to run the given inference latency benchmarking for the provided Bert model.

I was able to see that the error came from line 33 in bert.py. The model specified in qa_bert.py does not provide the right shape for the "inputs" variable that is used to extract the "input_ids" and "token_type_ids" in this line. I was able to get past this error by changing this in qa_bert.py, creating another Tensor placeholder for segment_ids_ph (with the same dimensions as the placeholder for input_ids_ph) in the export_graph function (that was previously commented out, line 94), and then included both of these tensors so that the implicit function call to the "call" method of the model in bert.py would have the correct "inputs" variable.

I wanted to ensure that this would be a correct way to fix this issue, to check whether or not I am using the repository correctly. I have attached a picture of the updated code.

Screenshot (10)

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant