You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Thank you!
The text was updated successfully, but these errors were encountered:
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.
Thank you!
The text was updated successfully, but these errors were encountered: